r/bookmarklets • • Feb 27 '21

Bookmarklet Archive

28 Upvotes

I've amassed a collection of bookmarklets, which you can find on https://gbasil.dev/bookmarklets


r/bookmarklets • • Oct 05 '22

If you find yourself wanting to download a video on PornHub in .mp4 format, this is your guy. NSFW

23 Upvotes
javascript:(()=>{const e=document.createElement("div"),t=document.createElement("div"),n=document.createElement("ul"),i=document.documentElement.scrollHeight;e.style.cssText=height: ${i}px; position: absolute;,t.style.cssText="background-color: #FFFFFF80; border: 1px solid #FF000060; display: block; font-family: inherit; font-size: 20px; left: 0; margin: 1rem; padding: 1.5rem; position: sticky; top: 1rem; z-index: 99999;",t.innerHTML='<ul id="mp4List"></ul>';const o=Object.keys(window).filter((e=>"flashvars_"===e.substring(0,10)));window[o[0]].mediaDefinitions.filter((e=>"mp4"===e.format)).forEach((e=>{fetch(e.videoUrl).then((e=>e.json())).then((e=>e.map((e=>{const t=document.createElement("li");t.innerHTML=<a href="${e.videoUrl}">${e.quality}</a>,n.appendChild(t)}))))})),t.appendChild(n),e.appendChild(t),document.body.prepend(e)})();

r/bookmarklets • • Apr 27 '22

Bookmarklets for preserving/archiving internet pages/history/culture

22 Upvotes

Quite often among deep dives of research I've come across key sources of information that is locked away behind forum links or websites that have long since died - making the information effectively lost forever. This is particularly common among niche fields (i.e, niche music genre forums or old history articles). Sometimes, the wayback machine comes in for the rescue. Someone, at some point (or a crawler), archived a particular page and preserved that information beyond the websites lifespan. Because of this, I've made it a habit to also archive web pages from time to time as I browse for future readers benefit. An easy way to do this is through bookmarklets - and you get to take part in preserving internet history!


Save these as bookmarks (right click bookmark bar > add page). The most common and most useful is the wayback machine:

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

The second most common archive is archive.today:

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

The javascript goes in the 'url' field. Then when you click on the 'bookmarks' while you're on a page, it'll open a new tab and archive said page.

You can also use the Web Archives browser extension to view archives/easily archive pages.


There is also ghostarchive.org, which is relatively new to me but I use it sometimes:

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

If you click on these bookmarklets, it will open a new tab and begin creating a n archive of whatever page you clicked the bookmarklet on. This page is then saved (in theory) forever. For an example of this, see these archives of wikipedias homepage: Wayback Machine, archive.today, ghostarchive.org (the wayback machine also lets you easily go back in history over the archives, like this one from 2003).


r/bookmarklets • • Aug 28 '20

Create a playlist from all YouTube links on a page

22 Upvotes

This is useful for when you're looking at a thread full of links to songs on YouTube, and want to listen to them without too much clicking.

javascript:var list = document.querySelectorAll('*[href*="youtu"]');var urls = [];for (var i = 0; i < list.length; i++) {var id = list[i].href.match(/.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#\&\?]*).*/);if (id!=null){ if (id[1].length == 11) { urls.push(id[1]);}}}var unq = urls.filter(function(elem, index, self) { return index === self.indexOf(elem);}); if (unq.length > 0){ window.open("https://www.youtube.com/watch_videos?video_ids=" + unq.join());}

I have it bookmarked as ListenToPage.

It's worked for me so far, but I'm sure others can point out efficiencies or potential bugs.


r/bookmarklets • • May 26 '24

I am building a site to share bookmarklets

19 Upvotes

https://getbookmarklets.com/

Each bookmarklet is just a URL, and you can share them without even adding them to the site:getbookmarklets.com/scripts#..., e.g https://getbookmarklets.com/scripts#https://raw.githubusercontent.com/madacol/web-automation/master/bookmarklets/edit%20page.js this is how it looks on the site


r/bookmarklets • • Jan 25 '19

x-ray - a little browser tool that I wrote that I keep going back to :)

19 Upvotes

Drag to your toolbar and x-ray your webpage!


r/bookmarklets • • May 08 '26

Just found: Draw on any web-page

18 Upvotes

Earlier today I just stumbled over this hidden secret, that answered everything I was wishing for in a single bookmarklet, allowing me to do some real time presentations with ease without having anything installed.

https://github.com/henriquemor/draw-bookmarklet

It's remarkable well done, and it made my colleagues ask to name the tool, so they could use it too. That's when I thought to share it here, too, as it definitely deserves some praises!

Note: I have no connections to this code, I'm just a really happy user of it.


r/bookmarklets • • Oct 09 '18

Congratulations, /r/bookmarklets! You are Tiny Subreddit of the Day!

Thumbnail
reddit.com
18 Upvotes

r/bookmarklets • • Aug 21 '25

Redirect X.com to XCancel.com

17 Upvotes

javascript:(function() { if(window.location.href.includes("x.com")) { location.assign(window.location.href.replace("x.com", "xcancel.com")); } else { window.alert("Are you sure this is Twitter?"); } } )();

XCancel allows you to view posts and their comments without the need of an account. This is nice for privacy minded people.
I am in no way affiliated to XCancel or X.


r/bookmarklets • • Apr 14 '22

YouTube Shorts to Regular Videos

17 Upvotes

Here's a simple bookmarklet that will take you from a YouTube short video to the actual video page, allowing you to add it to a playlist, see view counts, and view the description. Plus shorts are just annoying so...

javascript:location.replace("https://youtu.be/"+location.href.replace(/^.+youtube.com\/shorts\/(.+)/, "$1"))

r/bookmarklets • • Aug 09 '21

Inline reader -- make any news article readable

Thumbnail pastie.org
17 Upvotes

r/bookmarklets • • Jun 07 '21

HiddenSite: Bookmarklet to hide the browsing of a site

16 Upvotes

This is a bookmarklet to hide the browsing of a site by piggybacking on an existing browser tab. It's based on an idea of a Redditor's need:

https://www.reddit.com/r/operabrowser/comments/ntgbhd/how_to_remove_this/h0t5xp6/

Basically, the idea is to be able to browse a site without revealing its browser tab, as well as be able to hide the site view when needed, in case someone else is near, without closing the browsing session of that site.

Keep in mind that this trick uses IFRAME as a sub browser (in other site's web page). So, not all sites allow themselves to be served/displayed in an IFRAME, and some sites may aware that they're being served in an IFRAME where they will "get out" of the IFRAME and replace the browser tab's web page. Sites like those won't work with this bookmarklet.

To use the bookmarklet, the URL near the beginning of below bookmarlet code which points to Wikipedia (the u/url variable), must be changed. Additional sites will need to have their own bookmarklet.

Additional notes:

  • If the site is not yet opened (hidden or not), the bookmarklet will open the site.

  • If the site is visible, the bookmarklet will show a prompt to hide the site view, or close the site (and end the browsing session for that site).

  • If the site and the prompt is visible, the bookmarklet will hide both.

  • When the prompt is visible, clicking on the dimmed area will close the prompt and resume browsing the hidden site.

  • If the site is already opened but is hidden, the bookmarklet will unhide the site view.

  • When the site is already open but is hidden, a small yellow quare marker at botton-right of browser tab's view will appear to indicate that a site is already opened. In case one might forgot to close the site browsing session.

  • If a bookmarlet for site A is already open bookmarklets for site B, C, etc. will work like bookmarlet for site A. i.e. they will only work for hiding/showing the site view or prompt. The site must be closed in order to open other hidden site in the same browser tab.

  • If a hidden site is already open and is visible, switching to other tab or other application, will automatically hide the site view.

Here's the minified code:

javascript:/*HiddenSite*/(()=>{let u="https://en.wikipedia.org",e=document.body,i=window.hidSite,t=window.hidSiteOverlay,d=()=>{i=hidSite,t=window.hidSiteOverlay},o=()=>{d(),i.style.cssText="display:none!important",t&&t.remove(),e.classList.remove("sbshow")};t?o():i?i.style.display?(i.style.display="",e.classList.add("sbshow")):(i.insertAdjacentHTML("beforeend",'<div id="hidSiteOverlay"><div id="hidSitePrompt">\n<button id="hide">Hide Hidden Site</button><button id="close">Close Hidden Site</button></div></div>'),hidSiteOverlay.focus()):(e.insertAdjacentHTML("beforeend",`<div id="hidSite"><style>body.sbshow>*{display:none!important}${'#hidSite,#hidSite *{all:revert}\n#hidSiteFrame{position:fixed;left:0;top:0;border:none;box-sizing:border-box;width:100vw;height:100vh}\n#hidSiteOverlay{position:fixed;left:0;top:0;width:100vw;height:100vh;background:rgb(0,0,0,.5);cursor:pointer}\n#hidSitePrompt{position:fixed;left:50vw;top:1em;transform:translateX(-50%);border:.2em solid #007;border-radius:.5em;padding:1em;background:#fff;cursor:auto}\nbody:not(.sbshow):after{position:fixed;right:0;bottom:0;border:1px solid #000;width:.3em;height:.3em;background:#ff0;content:""}\n#hidSite button{cursor:pointer}\n#hidSite #close{margin-left:3em}'.replace(/([;\}])/g,"!important$1")}</style><iframe id="hidSiteFrame" referrerpolicy="same-origin"></iframe></div>`),hidSiteFrame.src=u,hidSite.onclick=(r=>{switch(d(),r.target.id){case"hide":o();break;case"close":i.remove(),e.classList.remove("sbshow"),removeEventListener("blur",o);break;case"hidSiteOverlay":t.remove(),hidSiteFrame.focus()}}),addEventListener("blur",o),e.classList.add("sbshow"),hidSiteFrame.focus())})()

And here's the source code:

https://pastebin.com/FXjeXugA

EDIT: forgot to include one additional note (the last one).


r/bookmarklets • • Jan 24 '20

Not mine. I just want to share my favorite; invert lightness, even after umpteen years.

16 Upvotes

I have the bookmarklet "invert lightness" on my bookmarks toolbar.
The site I got it from is:
https://www.squarefree.com/bookmarklets/color.html

On top of that, since I use surfingkeys, for a vim like browsing experience, it's as easy as pressing "b" for bookmarks, then start typing invert, press enter and escape, voila. I have preferred using the bookmarlets on his page over extensions because most extensions don't get it the way I like. It's not perfect, it doesn't work on all sites, but it's still great.

javascript:(function(){function RGBtoHSL(RGBColor){with(Math){var R,G,B;var cMax,cMin;var sum,diff;var Rdelta,Gdelta,Bdelta;var H,L,S;R=RGBColor[0];G=RGBColor[1];B=RGBColor[2];cMax=max(max(R,G),B);cMin=min(min(R,G),B);sum=cMax+cMin;diff=cMax-cMin;L=sum/2;if(cMax==cMin){S=0;H=0;}else{if(L<=(1/2))S=diff/sum;else S=diff/(2-sum);Rdelta=R/6/diff;Gdelta=G/6/diff;Bdelta=B/6/diff;if(R==cMax)H=Gdelta-Bdelta;else if(G==cMax)H=(1/3)+Bdelta-Rdelta;else H=(2/3)+Rdelta-Gdelta;if(H<0)H+=1;if(H>1)H-=1;}return[H,S,L];}}function getRGBColor(node,prop){var rgb=getComputedStyle(node,null).getPropertyValue(prop);var r,g,b;if(/rgb\((\d+),\s(\d+),\s(\d+)\)/.exec(rgb)){r=parseInt(RegExp.$1,10);g=parseInt(RegExp.$2,10);b=parseInt(RegExp.$3,10);return[r/255,g/255,b/255];}return rgb;}function hslToCSS(hsl){return "hsl("+Math.round(hsl[0]*360)+", "+Math.round(hsl[1]*100)+"%, "+Math.round(hsl[2]*100)+"%)";}var props=["color","background-color","border-left-color","border-right-color","border-top-color","border-bottom-color"];var props2=["color","backgroundColor","borderLeftColor","borderRightColor","borderTopColor","borderBottomColor"];if(typeof getRGBColor(document.documentElement,"background-color")=="string")document.documentElement.style.backgroundColor="white";revl(document.documentElement);function revl(n){var i,x,color,hsl;if(n.nodeType==Node.ELEMENT_NODE){for(i=0;x=n.childNodes[i];++i)revl(x);for(i=0;x=props[i];++i){color=getRGBColor(n,x);if(typeof(color)!="string"){hsl=RGBtoHSL(color);hsl[2]=1-hsl[2];n.style[props2[i]]=hslToCSS(hsl);}}}}})()

r/bookmarklets • • Feb 15 '19

I made a bookmarklet distribution service

16 Upvotes

TLDR: Easily distribute bookmarklets created on CodePen. Check out bookmarkl.ink. Project is open source and can be found here.

Several years ago, I created a platform to distribute bookmarklets for fun. It was hosted on Heroku and ran everything server-side. I didn't think to publish anything about it. Recently, when going through my old projects, I decided to revamp the service. It is now a static website with all the interesting bits happening client-side. It's hosted in an S3 bucket with a CloudFront distribution in front.

The service takes the URL of a CodePen pen and extracts just the JavaScript. The JS is then transpiled to EMCAScript2015 (ES6) and minified. The code is URI encoded, prepended with javascript:, and stuck into the href of an anchor on the page. This effectively allows you to 1) run the JS by clicking the button and 2) save the bookmarklet by simply dragging it to a browser's bookmarks bar. These bookmarklets can be shared by URL, enabling others to easily try them out and potentially save them.

I was thrilled when I found this little community last week. Hope you guys can see a use for this.

There are a few examples on the site's main page. Shoot me a message if you come up with some interesting bookmarklets! PRs and criticism very welcome.


r/bookmarklets • • May 27 '25

View or edit your bookmarklets in abookmark bookmarklet editor

Thumbnail
gallery
15 Upvotes

The way browsers handle bookmarklets (encoding them into a single, often long and unreadable URL) makes them incredibly difficult to edit directly within standard bookmark managers. We even edit them in other places and save them as 'source codes,' then encode and paste them into bookmarks.

Why can't we edit the source codes directly in bookmark managers?

Abookmark now comes with a "bookmarklet editor", which allows you to edit bookmarklets in the format of source code directly in its code editor:

  • Decoding and reconstructing the bookmarklet: Instead of showing the jumbled, URL-encoded string, it presents the underlying JavaScript code in a human-readable format.

  • Providing a code editor: A dedicated code editor makes it much easier to modify the script.

  • Automatic minifying and re-encoding: When you save your changes, the editor automatically re-encodes the JavaScript back into the URL-encoded format, ready to be used as a bookmarklet.


r/bookmarklets • • Dec 08 '22

Bookmarklets Menu bookmarklet - Pastebin.com

Thumbnail
pastebin.com
14 Upvotes

r/bookmarklets • • Jan 03 '20

Hey r/Bookmarklets! It's time to vote for the best of the best of 2019.

14 Upvotes

Every year reddit.com does a yearly best of rewards. This year is best of 2019. What's that mean? We got a bunch of reddit awards to give away, we'll be giving the awards to the highest voted nominee and the winner of each category.


Let's get down to some categories:

  • Best Overall Post

  • Best Overall Comment

  • Best User

  • Best Mod

In previous years we have struggled to get many nominations due to having to many categories, to try and get more nominees we have simplified the categories

the top voted nominations will receive reddit premium, courtesy of the admins


How voting will work:

This thread will be set to contest mode. This means that all comments will be sorted randomly and no scores will be displayed.

Please reply to the top level comment under the category with appropriate links for your nomination. Please only nominate a submission once per category. If you see the one you wanted to add please upvote it (this is how you vote on each category). At the end we will check all the vote numbers to determine the winner in each category.

You may not nominate your own threads

You may not nominate yourself

You may upvote nominations you agree with (that's how the winner is determined)

You may only nominate submissions made in 2019.


Awards will be awarded to the winner of each category!


Feel free to message us if you have any questions.

Help us vote for the best of the best & GOOD LUCK EVERYONE!


r/bookmarklets • • Jan 05 '19

Go to parent directory

12 Upvotes

e.g. if the current URL is:

https://site.com/sub1/sub2/file?var=value#section

It will go to:

https://site.com/sub1/sub2/

Clicking it again will go to:

https://site.com/sub1/

Click again will go to:

https://site.com

Click again will do nothing because the current URL is already at the root directory.

Code:

javascript:((e,t)=>{(t=e.pathname)[t.length-1]==="/"?t=t.match(/(.*\/).+$/)[1]:t=t.match(/^.*\//)[0],e.href=e.protocol+"//"+e.host+t})(location)

r/bookmarklets • • Oct 26 '17

Cleanup Reddit posts for Screenshots

12 Upvotes

You want to make a screenshot of a reddit post, but you're annoyed by the textfield to answer to that post?

no problem:

select this javascript and drag it to your bookmark bar:

javascript:(function(){ $("ul.flat-list.buttons").remove(); $(".usertext.cloneable.warn-on-unload").remove(); $(".commentarea>.menuarea").remove(); $(".commentarea>.panestack-title").remove(); (function(){let a=$("<span style='cursor: pointer; float: left;'>[x]</span>");$(a).click(function(){let b=$(this).closest(".comment, .morechildren");$(b).fadeOut()}),$(".comment .tagline").append(a)})(); })();

javascript to your bookmarks, click on it when on reddit, it will remove everything for the screenshot unnecessary stuff like the answer textbox, or links for "permalink, embed, ..." it also adds an button [x] to remove a comment, because it is clutter in the screenshot.

compare here: https://imgur.com/7NQMnrY


i was sending often screens of funny comments to a friend, and got annoyed of cleaning up un-funny comments manually


r/bookmarklets • • Jul 06 '25

Tool that simplifies any page with just a bookmarklet

11 Upvotes

Thereโ€™s a tool called unrav.io that uses a bookmarklet to transform any webpage into a more minimal, readable, or interactive version, depending on the content. No extensions or installs, just drag the bookmarklet and go.

It seems like most people donโ€™t really use bookmarklets much anymore, but this feels like something that fits right in with that old-school spirit. Wondering if others here find it useful or have similar tools they use.


r/bookmarklets • • Jul 15 '20

Can a bookmarklet be turned into a script for Tampermonkey?

11 Upvotes

I have a bookmarklet used on Youtube for an extension and its non-convenient to click it every time i open a new Youtube tab? What i understand is that a bookmarklet and Tampermonkey script both are java scripts (most of times).so is there a way to add this to Tampermonkey in a easy and simple way.


r/bookmarklets • • Apr 16 '19

๐•‹๐•–๐•ฉ๐•ฅ ๐”ผ๐••๐•š๐•ฅ๐• ๐•ฃ for Facebook, Reddit, Twitter, Instagram - Make Text ๐—•๐—ผ๐—น๐—ฑ, ๐˜๐˜ต๐˜ข๐˜ญ๐˜ช๐˜ค, uสop-วpฤฑsdn, sฬถtฬถrฬถiฬถkฬถeฬถtฬถhฬถrฬถoฬถuฬถgฬถhฬถ, Wingdings... etc.

11 Upvotes

r/bookmarklets • • Aug 10 '22

Reddit Video Player bypass bookmarklet

10 Upvotes

Opens the video itself directly in a new tab.

javascript:let%20vsources=Array.from(document.getElementsByTagName('source'));window.open(vsources[vsources.length-1].src.split('?',1),'_blank');void(0);

Edit - Updated version:

javascript:let%20vsources=Array.from(document.getElementsByTagName('source'));window.open(vsources[vsources.length-1].src.split('?',1).toString().replace(/[\w.]+$/,'HLSPlaylist.m3u8'),'_blank');void(0);

r/bookmarklets • • Jul 06 '19

Coolest Set of Bookmarklet Toolkits! Drag & Drop to your bookmarklets bar.

10 Upvotes

I've been working on these a while now, they keep getting better, but I only tend to them sporadically. Check them out!

https://codepen.io/bookmarklets/pen/MLxoJJ

Drag and drop the ones you want to your bookmarks bar. When you click on any of them, a dropdown menu will open up on the page and you can do cool hackey stuff!


r/bookmarklets • • Sep 13 '18

GistMarklets - Make bookmarklets easier to install. Code for bookmarklets stored inGithub Gists.

10 Upvotes

Hey folks! I just found this sub. I love bookmarklets! A few years ago I made a little tool to make it easier to install bookmarklets:

GistMarklets

It creates a simple interface with instructions and a fancy arrow to help guide a user to install the bookmarklet to their bookmarks bar.

The code is loaded from a Github Gist of your choice. If there's enough interest I might port this to loading code from this subreddit.

Here's screenshot: