Troubleshooting & How-Tos 📡 🔍

Useful Bookmarklets

A collection of bookmarklets that I’ve found useful.

Change The Current Page

Reverse Colors as a quick and dirty close-enough-to-dark (or light) mode, via Invert Colors bookmarklet

javascript:void( document.body.parentElement.style.filter = ( document.body.parentElement.style.filter == '') ? 'invert()' : '')

Do Something Using the Page

Lookup on the Wayback Machine (via Wikipedia: Using the Wayback Machine)

javascript:void(window.open('https://web.archive.org/web/*/'+location.href.replace(/\/$/, '')));

Save to Archive.org (via the same article)

javascript:void(window.open('https://web.archive.org/save/'+location.href));

There’s also a browser extension with more features.

Load from Archive.ph (via Archive bookmarklet)

javascript:void(open('https://archive.ph/?run=1&url='+encodeURIComponent(document.location)));

Save to Archive.ph (via this Reddit thread)

javascript:(function(){window.location = 'https://archive.ph/submit/?url=${encodeURIComponent(window.location.href)}'})();

WordPress: Press This - an official plugin re-enables it and adds the bookmarklet code to your dashbboard under Tools/Available Tools

Share on ShareOpenly (adapted from the Archive.ph save above)

javascript:void(open('https://shareopenly.org/share/?url='+encodeURIComponent(document.location)+'&text='+encodeURIComponent(document.title)));

Save to Postmarks (a linkblogging/bookmark sharing server) - replace YOUR_POSTMARKS_SITE with the name of your Postmarks site, or just copy it directly from your admin page.

javascript:(function(){w=window.open('https://YOUR_POSTMARKS_SITE/bookmark/popup?url='+encodeURIComponent(window.location.href)+'&highlight='+encodeURIComponent(window.getSelection().toString()),'postmarks','scrollbars=yes,width=550,height=600');})();

Validate the HTML using the W3C online validator.

javascript:location.href='https://validator.w3.org/check?uri=%27+escape(location.href);

Navigation

Up One Level (via a discussion thread I can’t find anymore.)

javascript:a=location.toString(); a=a.indexOf('/ref=') > 0 ?%20a.replace(/\/ref=.*$/,%20%27/%27)%20:%20a.indexOf(%27?%27)%20%3E%200%20?%20a.replace%20(/\?[^?]*$/,%20%27%27)%20:%20a.replace%20(/\/[^\/]*\/*$/,%20%27/%27);%20location=a;

Download a Chrome Extension (via the Ungoogled Chromium FAQ)

javascript:location.href='https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion='+(navigator.appVersion.match(/Chrome\/(\S+)/)[1])+'&x=id%'+'3D'+(document.querySelector('a[href^="./detail"][href$="/report"]').pathname.match(/([^\/]+)\/report$/)[1])+'%'+'26installsource%'+'3Dondemand%'+'26uc';