You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
javascript: ban disallows legitimate use for bookmarklets #165
I want to create a bookmarklet, which means an <a href="javascript:...">link</a> that I can drag to my bookmarks tab and there click on it to perform some JS on any page I'm on.
Elm's VDOM disallows this so the best I could do is to link to a file on GitHub that contains the bookmark source code.
Activity
jackwilsdon commentedon Feb 21, 2020
It's still possible to have a
javascript:link usingHtml.Attributes.property, although this seems like more of a workaround than a solution:Ellie link
Janiczek commentedon May 5, 2022
Note this workaround doesn't work with
--optimizebuilds.laurentpayot commentedon May 6, 2022
Unfortunately this is true and makes this nice workaround useless 😞
Janiczek commentedon May 16, 2022
virtual-dom has recently been fixed; this now doesn't work in non-optimized builds either.
Here is a way to have bookmarklets in Elm via WebComponents: https://ellie-app.com/hwbBHmqLQ8Ra1