Hey, scittle newbie here. I'm using https://gist.github.com/henrik42/f9e1977a35380bb28829c06301509841 with https://babashka.org/scittle/bookmarklet.html?gist=henrik42/f9e1977a35380bb28829c06301509841. I'm trying to build a bookmarklet that opens a react gui. So far it seems to run "kind of". In firefox I can inspect the DOM and there I see a <div>Hello world!</div> element but nothing shows in the page. I suspect this may have something to do how firefox builds the DOM for javascript:-URLs but I'm really just guessing. Any help/pointers?
@borkdude Just as a follow up: I noticed, the the Scittle Bookmarklet creator produces https://babashka.github.io/scittle/js/scittle.js for the download URL and this redirects to https://babashka.org/scittle/js/scittle.js which makes my firefox download the code twice. I couldn't find the source on github. Are the sources publicy available?
Use the CDN links might help solve the problem
@henrikheine I mean these links: https://github.com/babashka/scittle/releases/tag/v0.6.17
Maybe I didn't understand your question properly. Feel free to follow up
FWIW, when I change .appendChild to .prepend and then click the link it works for me
also it works when I click the link after the page was loaded , perhaps the code just isn't run on load
I just see a blank page.
Ah sorry. You are right, when I do a "click" it adds "Hello world!" to the top. I was doing a ctrl-shift-click because I wanted to open the app in a new tab. And in that case I just see a blank page.
you need to add it as a bookmarklet I think and then click it while being on the blank page
with your gist, this works fine:
(tested on chrome)
OK, got it. The bookmark works as long as I'm on a page incl. about:blank. But I cannot ctrl-click on the bookmark to open a new page and run the bookmarklet in one jump. Thanks for your help!
nice!
@borkdude Been playing around with sci & scittle and came up https://gist.github.com/henrik42/885547a26ddf0bfacef4344bf128683f. Running the "Scittle Bookmarklet creator" as a bookmarklet. sci is just so much fun! Thanks a lot for that!