On most sites I use, I automate something. Since I don’t like to keep two versions of the code (plain and in bookmarklet form), I wrote this editor to convert the code in both directions.
You can click on the question mark to get more infos about bookmarklets in general, this editor in particular, and some examples.
Are bookmarklets usable again, now? It seemed like all the major browser engines were ok with breaking them in favor of CSP so I had pretty much given up on them.
I would imagine the only time csp being a problem is when you connect to some external resource. if you are just modifying things locally it works fine. I have a few bookmarkletes and they work fine.
Nice. Simple and to the point. We need to bring back this mindset of small yet very useful tools than can be learned in seconds. Bookmarked! Pun intended. Pun intended.
This is a tool I use pretty regularly.
On most sites I use, I automate something. Since I don’t like to keep two versions of the code (plain and in bookmarklet form), I wrote this editor to convert the code in both directions.
You can click on the question mark to get more infos about bookmarklets in general, this editor in particular, and some examples.
Are bookmarklets usable again, now? It seemed like all the major browser engines were ok with breaking them in favor of CSP so I had pretty much given up on them.
I’ve been using one a lot, to toggle between looking at Mastodon posts on their home instances vs. on my home instance.
Is that a simple URL rewrite?
I pasted it in this, then took that long single line over to Beautifier, and it’s 75 lines long.
please post a pastebin link! this sounds like an extremely useful bookmarklet 😊
It’s from this generator, though I might try @no_gravity ‘s, and I’ve seen but not tried another.
This works for me:
Before you turn it into a bookmarklet, set your_instance to the Mastodon instance you use.
This seems slower, but the simplicity is pretty appealing.
I use bookmarklets on pretty much every site I visit regularly, and I never had a problem with CSP.
Can you give an example of a bookmarklet and a website that do not work together?
I would imagine the only time csp being a problem is when you connect to some external resource. if you are just modifying things locally it works fine. I have a few bookmarkletes and they work fine.
That wasn’t the case for ~5 years that firefox wouldn’t run bookmarklets on CSP sites at all, according to the history here: https://bugzilla.mozilla.org/show_bug.cgi?id=866522
Sounds like they did finally fix the case that doesn’t need subresources, though still haven’t fixed it for those that do.
Nice. Simple and to the point. We need to bring back this mindset of small yet very useful tools than can be learned in seconds. Bookmarked! Pun intended. Pun intended.