This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-27
Channels
- # aws (7)
- # babashka (145)
- # beginners (83)
- # calva (18)
- # cider (11)
- # clara (9)
- # clj-kondo (59)
- # cljdoc (4)
- # cljs-dev (4)
- # cljsrn (11)
- # clojure (168)
- # clojure-australia (21)
- # clojure-dev (5)
- # clojure-europe (46)
- # clojure-italy (3)
- # clojure-nl (10)
- # clojure-taiwan (1)
- # clojure-uk (55)
- # clojurescript (85)
- # clojureverse-ops (1)
- # code-reviews (3)
- # conjure (22)
- # cursive (3)
- # datahike (3)
- # datomic (4)
- # emacs (5)
- # helix (20)
- # jackdaw (1)
- # jobs (2)
- # jobs-discuss (7)
- # lsp (1)
- # malli (5)
- # off-topic (85)
- # other-languages (4)
- # practicalli (4)
- # reitit (2)
- # releases (2)
- # sci (62)
- # shadow-cljs (181)
- # testing (5)
- # tools-deps (15)
- # xtdb (31)
awesome!
I’m already using it 😅🚀
There is now also scittle.core.eval_script_tags()
, handy if you are editing remote scripts and want to reload them from the console
Yeah I saw it while experimenting. Nothing better than working in a live environment 😅
If we end up with many plugins maybe something like a require-plugins
will be handy. For the bookmarklet case for instance you need to coordinate the loading of scripts and it’s all asynchronous. This is for when you want to go fancy with reagent in your bookmarklet
Yeah nice right, i’m having fun with it as well haha
Maybe 🙂
you can disable the auto-loading of the snippets right now using scittle.core.disable_auto_eval()
I’ll come up with some use cases first and hack around. Maybe a nice pattern will emerge later
I also thought sharing bookmarklets via gists could be nice. E.g something like your https://borkdude.github.io/sci.web/?gist=jeroenvandijk/190c254c3ff5c25752d3f59d5d3e7f19
yeah, I guess people could just publish an HTML page where you click on a button to get it as a bookmarklet right
haha yeah I’ll try to make something useful first. I just wanted to fix at least the obvious errors for now
Some sites (rightfully so) set the Content Security Policy headers to be restricting this (https://content-security-policy.com/)
This limits the use cases a bit, but maybe a browser extension could be added that undoes this again if we want to use it on those sites
I was thinking of adding metadata to a bookmarklet that would check (in javascript) to see if the domain is whitelisted to give the user a better error. E.g. “This bookmarklet can only be used on the following domains …”
An extension like https://requestly.io/ could alter those headers to add http://borkdude.github.com to the whitelist for instance. Probably too much effort for most people, but maybe interesting for the power users
Would it be possible to let the user upload their cljs code as a file with scittle?
It could make a cool intro to reagent xD
I mean you can add a new tag at the end of the body
scittle exposes scittle.core.eval_string()
so you can call that after you load the file
Oki doky
The scittle bookmarklet-generator is good fun 🙂 Search the Slack-archives:
(when-some [q (js/prompt "Search the Clojurians Slack-archive:")]
(set! (.. js/document -location -href) (str " " q)))
Prefilling via a query-param would be cool: https://borkdude.github.io/scittle/bookmarklet.html?script=%28when-some,,,,
Sounds like a good idea! How would you generate the query string?
Should it be part of the editor?
Like a “Share button” (copy to clipboard)?
I was looking at using history.pushstate - it would update the script
-param while editing.
Yeah that could work. Right now you can also drag an existing bookmark to the editor and the cljs code will be extracted
ah nice. This preload-via-script-param would allow for a bookmark to be inspected/modified by others before bookmarking
Makes sense! Better not too trust arbitrary obfuscated scripts in urls 😅
@U04V6FEES I’ve added some support for gists https://github.com/borkdude/scittle/pull/4
Your idea is probably easier to work with (no need to create gists, just copy link somewhere)
PR open https://github.com/borkdude/scittle/pull/5 I hope the wording in the UI for the newly introduced link is clear…
@U04V6FEES what is the sharing button supposed to do?