Hacker Newsnew | past | comments | ask | show | jobs | submit | ashtonmeuser's commentslogin

For anyone stumbling upon this that deals with bookmarklets, I submit bookmarkl.ink[0], a tool I made to ease the maintenance of bookmarklets.

In short, it pulls code from GitHub Gists (which have the benefit of being backed by git repos), transpiles, minifies, bundles, and wraps in an IIFE. It's also got a basic module resolver that allows you to include libraries or remote files.

This allows you to use creature comforts like TS and libraries and maintain code readability while still ending up with the smallest possible bookmarklet. It also allows you to link to a particular version (git hash), present user-defined variables, edit code in an inline editor, etc.

Enjoy!

[0]: https://bookmarkl.ink


Bookmarklet aficionado and maintainer of bookmarkl.ink here. Took the liberty of posting this bookmarklet: https://bookmarkl.ink/ashtonmeuser/849a972686e1505093c6d4fc5...


Wow, the Doom bookmarklet is kind of cool. https://bookmarkl.ink/ashtonmeuser/04710d3befc446e849108a587...

It seems there isn't a way to browse existing bookmarklets, other than the small, curated lists?


Thanks! Re: listing bookmarklets, that's something I'd like to do but have yet to find a cheap/easy way to do it. One way would be to search gists for relevant metadata [1] but GitHub does not include searching gists in their API. Another way might be logging paths in an edge function. Open to suggestions/PRs.

[1] https://gist.github.com/search?q=bookmarklet-title


I'm not seeing any way to browse them either. I'd love such a feature.


I have a couple bookmarklets scattered in a couple blog posts that you may find interesting / want to add:

* https://river.me/blog/bookmarklet-stay-here/

* https://river.me/blog/firefox-keep-bookmark-keywords/

* https://river.me/blog/url-bar-is-a-cli/


Your wish is my command.

- https://bookmarkl.ink/ashtonmeuser/a36be4b6c835276f1a22a8c49...

- https://bookmarkl.ink/ashtonmeuser/a36be4b6c835276f1a22a8c49...

- https://bookmarkl.ink/ashtonmeuser/a36be4b6c835276f1a22a8c49...

Interestingly, in the URL CLI article, you mentioned the difficulty of maintaining such bookmarklets. That was a huge motivator for bookmarkl.ink. You can keep your verbose, commented code in a gist while the actual bookmarklet is tree shaken, stripped of comments, minified, and encoded. As of late, you even get some creature comforts like TypeScript support. Finally, every gist is a repo behind the scenes so you get version control for free.


ohhh I thought it was primarily a repository for people to browse each other's bookmarklets, I am going to check it out if it would let me do my management in a more sane manner! I am still using the system in that blog post with regex and deletion+reimporting when I need to update several at a time (which is not that uncommon) and I still hate it haha

thanks!!


Aficionados will appreciate Jesse Ruderman's bookmarklets at https://www.squarefree.com/bookmarklets/ which have been saving my sanity since the early 2000s.


I love this project! I used to use a lot of bookmarklets, but lost a lot of them and couldn't find all I used to use. Is it possible for you to create a directory or listing for all the hosted bookmarklets, but that might need curation too.


Nice, this is very cool, thanks for the work & for sharing :)


Safari also entirely disables CSS multi-column when printing per this 17 year old bug: https://bugs.webkit.org/show_bug.cgi?id=15546.


A postmortem of a (somewhat) simple project meant to show off the power of WebAssembly within Godot, and therefore my Godot Wasm addon [0].

[0] https://github.com/ashtonmeuser/godot-wasm


I took the liberty of making your bookmarklets easier to edit/share with my tool bookmarkl.ink [1].

Markdown Link: https://bookmarkl.ink/ashtonmeuser/6e3869d8e468e016f22a4b4de...

Wayback Machine: https://bookmarkl.ink/ashtonmeuser/6e3869d8e468e016f22a4b4de...

Nitter: https://bookmarkl.ink/ashtonmeuser/6e3869d8e468e016f22a4b4de...

[1] https://bookmarkl.ink/


Wouldn't it be more in the spirit of bookmarklets to share tham as data: URLs containing a link with the bookmarklet?


The one they shared is backed by gist which is much better if you want to understand the code.

The gist also allow people to comment on the bookmarklet.

Of course - now they have a way of injecting arbitrary javascript code into the browser of the people using the service to bookmark the bookmarklet. Lack of trust sucks.

And (due to lack of trust) most applications make it hard to share javscripts links - so you need to instead instruct people to create a new bookmark and past the content into instead of right-clicking a link and clicking "bookmark".


Hi! Agreed re: advantages of gist/git backing. Comments and gist history via GitHub add a lot of value for free. The tool also allows bookmarklet creators to write in modern, un-obfuscated JS as there are transpilation, minification, and IIFE wrapping applied to the bookmarklet.

The security risk angle is also a concern I share. If you take a look at the disclaimer at the bottom of my project README [1], you'll see this exact issue mentioned. Versioning gists and thus bookmarklets is discussed in the same document [2]. This locks bookmarklet source to a specific commit of the git repo underlying a gist.

[1] https://github.com/ashtonmeuser/bookmarklet-platform?tab=rea...

[2] https://github.com/ashtonmeuser/bookmarklet-platform?tab=rea...


Final nitpick.

> And (due to lack of trust) most applications make it hard to share javscripts links - so you need to instead instruct people to create a new bookmark and past [sic] the content into instead of right-clicking a link and clicking "bookmark".

This is mostly true for mobile browsers. For desktop, simply dragging the button to the bookmarks bar ought to do the trick. Please feel free to open an issue if you've found this not to be the case!


Ah, I see how that paragraph could be misunderstood. I actually meant it as an advantage of the service. Sharing a link to bookmarkl.ink is trivial in any system since it's just a regular link. Where as if you want to share a bookmarklet (as a use-friendly-link) directly in chat system like Slack (or in a github comment) you can't since these most likely refuse to display javascript: links


fantastic service. thank you


I took the liberty of making your bookmarklets easier to edit/share with my tool bookmarkl.ink [1].

Don't Mess With Paste: https://bookmarkl.ink/ashtonmeuser/6e3869d8e468e016f22a4b4de...

Nebula No-Alt-#: https://bookmarkl.ink/ashtonmeuser/6e3869d8e468e016f22a4b4de...

Canvas DL: https://bookmarkl.ink/ashtonmeuser/6e3869d8e468e016f22a4b4de...

[1] https://bookmarkl.ink/


Thanks for your site, and to the GP who made Don't Mess With Paste!

Feel free to add this if you want, I have it in my firefox called "UnfuckSlack" which puts the old slack UI back:

javascript:(function() { localStorage.setItem("localConfig_v2", localStorage.getItem("localConfig_v2").replace(/\"is_unified_user_client_enabled\":true/g, '\"is_unified_user_client_enabled\":false')); location.reload(); })();



you have listing page to browse these?


Unfortunately, no. This is a simple pet project aimed at easing sharing/versioning of bookmarklets. The site is entirely static. Listing bookmarklets is, however, something I'd love to add.

A simple and sensible way to list bookmarklets may be scraping GitHub's own search [1]. Using a flag in gists such as `// bookmarklink-index` or similar may be a good way to go.

[1] https://gist.github.com/search?q=extension%3Ajs+bookmarklet_...


Love seeing cool stuff like this, thank you.


The proper way would be a bookmarklet that renders a list of bookmarklets.


I created a tool [1] to easily convert GitHub gists into bookmarklets and share them. Includes versioning, multi-file gists, etc. Some of my favourite examples hide images until mouseover [2] and play a procedural Brian Eno tune [3].

[1] https://bookmarkl.ink/

[2] https://bookmarkl.ink/ashtonmeuser/21427841853c9f2292c8f7d7a...

[3] https://bookmarkl.ink/ashtonmeuser/5e696524d986ba6c25af0df89...


Thanks, would be cool to have a quick copy button, as these "bookmark me" buttons never work on mobile. With a simple copy button I could create a new bookmark easily on mobile.


I believe I had this at one point but ditched it as browser support was spotty (looking at you, iOS Safari). Looks like support for async clipboard API [1] is getting there so I'll look at adding this functionality back.

[1] https://caniuse.com/async-clipboard


Unfortunately, web exports are not yet supported. See https://github.com/ashtonmeuser/godot-wasm/issues/18 for more details. Web support is on the roadmap.


BC gov?


It’s hilarious to me that the most absurd, standoutish picture is Jason, the only human team member.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: