"Remove sticky" is a must have on the modern web. Probably my most used bookmarklet.
A couple of others I use frequently:
Go to referrer. This fixes an infuriating missing feature in browsers, where links opened in new tabs lose their history (why?). Often this workaround will work:
There’s a fun way around that specific “remove sticky” bookmarklet, because it only looks at elements within the body. But did you know: you can actually show content from the head! For example, you could display the document title and make it sticky:
You can apply this technique to <script> and <style> content as well to get other text nodes that are normally hidden to appear on-screen. You could also use ::before and ::after psuedoelements on other elements (and for bonus marks remember you can use attr() within their content). But no regular formatting within the head. Well, unless you append the nodes to the head with JavaScript. Yeah, the DOM lets you create nominally illegal structures that can’t be serialised again.
On the video faster/slower playback thing: it would be better for the slower link to multiply by 0.8 rather than 0.75, so that it’s the opposite of faster. Currently each time you click faster once and slower once, you end up at 93.75% speed rather than 100%.
I was kind of impressed by Spritz[0] speed reader a few years ago when I tried it. Fun to see their entire(?) business which raised over $4 million[1] in VC replaced by a JavaScript booklet.
I wrote a RSVP app in J2ME for my Sony Ericcson T610. I feel like it made sense then, when the whole screen was so small you couldn't reasonably read long form text on it in any other way. Some of my friends used it to read books on their commute on the tiny screens of phones back then. Now that phones and tablets are not much smaller than books anyway, you really have to be invested into the niche idea of speedreading to find it useful and as I understand it, most research shows that although you can increase your reading speed, it comes with a reduction in understanding and retention if you push it too far.
I believe Spritz was taken over by one of their funders, as it happens. This is a cautionary tale to founders who are tempted to raise too much for the stage they're at — raising money accelerates your trajectory but also increases your chance of failure.
It also shows that "money raised" is not always a good metric for success.
I'd argue it's better than Spritz because it preserves your privacy.
I developed and sold a speed-reading app on iOS for a few years and users frequently wrote in to ask for Spritz support. Spritz had a patent (or patent application) and was known to shut down [1] non-licensees, so I looked over their API's terms of usage. Unfortunately they required users to create individual accounts with them. As this would enable them to track who was reading what with their technology, it was a non-starter for me and I'm sure many other devs felt the same way.
I use this bookmarklet to collapse all the top comment threads on a hacker news story. I usually do this for stories where there's a lot of threads, and use the currently open thread is my "bookmark". It collapses 1 thread a second (any faster and the toggle request may not succeed):
javascript: var TIMER_WAIT = 1000; var timer = 0; var topComment = []; var list = document.getElementsByClassName('togg'); for (let item of list) { if (item.parentElement.parentElement.parentElement.parentElement.getElementsByTagName('img')[0].width == 0) topComment.push(item) }; for (let item of topComment) { setTimeout(() => { console.log("toggling comment by " + item.parentNode.getElementsByClassName('hnuser')[0].innerText); item.click(); }, timer + TIMER_WAIT); timer = timer + TIMER_WAIT; }
Thanks for sharing this great collection. I've just added your 'remove sticky' bookmarklet.
In case anyone is wondering, bookmarklets also work on mobile devices. You can simply go to the address bar and type the name of the bookmarklet (e.g.: 'remove sticky') and then click the option that shows up in the list.
Adding them to your mobile browser is a bit tricky though. I've written a small guide that helps users of my app [0] add my bookmarklet to Android/iOS devices. You can follow these steps/screenshots to add other bookmarklets - https://www.emailthis.me/web-page-to-email/how-to-save#andro...
Can any Firefox experts help me out with a bookmarklet, please?
A HN comment a while ago reported that you can switch to the 'reader mode' view of a website by prefixing the URL with 'about:reader?url=' - this can be useful for some pages where FF doesn't put the 'reader mode' button in the URL bar.
This seemed like an ideal use for a bookmarklet, so I created one as follows:
Note: You must access about: protocol pages by typing them into the address bar. Attempts to navigate through window.location will throw — Error: Access to 'about:addons' from script denied.
Well, I guess you could probably use document.execCommand to do it, unless that is blocked for JavaScript uri scheme access, or ask for async clipboard access (I wonder what happens if you ask for it from JavaScript uri, should take time to investigate some day)
Also if I put a link into the page with the about:reader uri scheme, it does not work (opens blank page if I open new tab, does not go anywhere if I click on it without opening new tab)
I suppose it might work if I put it into an extension of some sort, if not then I think to make it work on Windows it would be easiest to have an AutoHotkey script that prepended about:reader?url= on the address line and pressed enter for you.
I have as yet to find a worthwhile AutoHotkey competitor on Linux or MacOs.
The benefit of using the add-on in Firefox is it a keyboard shortcut (that you can customize). So now instead of having to find+click a bookmarklet, I just hit cmd+shift+k on most sites I visit.
FTR, there's a little cottage industry of text expanders (whether dedicated or part of eg Alfred's suite of tools) which provide complete control over keyboard shortcuts and scripting / automation.
My free service where you can create bookmarklets. I use them for various things. One thing I am quite happy about lately is generating random things for forms. I use this when I test things in the browser at work, signup flows, etc.
There is a reset bookmarklet for that, but I agree that 2 bookmarklets to control speed are better than needing 3 (or having to reload the page+video).
I also wrote about a few I find useful, biggest one is 'Sane Color', it changes the text to be black on white. (Some sites have very hard to read colors, and sometimes I prefer light mode over dark)
https://loftie.com/post/3-useful-bookmarklets-i-use-almost-d...
> Blog posts, sign-up pages, curated lists, and other reading material can't be tried out, so can't be Show HNs.
It's a list, but it's not intended to be consumed the way a list of books or other resources is meant to. It's a list of useful scripts that can be tried right away.
I'd like to use one or more bookmarklets to (1) define a standard size and location for my Safari windows, and (2) reset the size and location of the current window to the standard settings. Can bookmarklets persist information for later use?
It's great that anyone can just drag drop bookmarklet from website into bookmark bar and just use it without any restrictions, unlike extensions. No signing and uploading to "extension store".
I use remove sticky bookmarklet frequently. On Firefox one can place a bookmark wherever one wants, so I have a Panic! button to unstick/unfix those dreadful headers.
I am not able to add bookmarklet to Main toolbar(address bar). When I drag it over the toolbar there is no drop point. Do I need to enable/disable any option to unlock it?
You’ll want to do things like skip events targeted at form elements or within a contenteditable, perhaps unless you use a suitable modifier.
It may be helpful to flatten the modifiers and key into a single string, like "Ctrl-Meta-Shift-S", and match on that.
The security interactions between your user script code and document code are fiddly and troublesome, and debugging is distressingly limited. I find using window.eval(`…`) to be a good technique for executing arbitrary code in the security context of the page itself.
But if the equivalent exist as a Firefox add on, I use that instead, because it bypasses many restrictions.
In this article, the video BM can be replaced with the excellent "Enhancer for Youtube", at least on Youtube: https://addons.mozilla.org/fr/firefox/addon/enhancer-for-you.... Just being able to change the speed of the video using the mouse wheel is a god send.
Same for archive.li or the way back machine.
But I'll steal the space scroll one, this red bar is nifty.
Ok, but please remember that this is a highly international site and there are many thousands of non-native speakers posting in English here. It's not cool to shame them. (Especially since most of us who would criticize them have no second language at all.) If you notice an error, it's better to neutrally offer correct information.
Submitted title was "Show HN: Some Bookmarklets, I Use".
I moved over to Violentmonkey (https://violentmonkey.github.io) so everything I needed bookmarklets for is now automated, instead of having to hunt around my bookmark folders.
You can even add them as right-click menu options for those scripts which you rarely use!
A couple of others I use frequently:
Go to referrer. This fixes an infuriating missing feature in browsers, where links opened in new tabs lose their history (why?). Often this workaround will work:
Open in wayback machine. For when you follow a link and there's nothing there anymore.