My bookmarklets
Home

What's a bookmarklet?

My simplest definition is as follows: a bookmarklet is JavaScript code stored in a bookmark. It will perform a desired action or modification on the current page as to increase your productivity and convenience or to bypass stupid design decisions. The same code can be used in other browsers or with Greasemonkey and similar extensions.



Open a full-resolution Instagram .jpg

Instagram hides the original .jpg behind a "CSS Wall". You can't use a right-click menu command to open the picture in a new window or copy the direct link. Bookmark this code and you get to access it with a single click:

javascript:location.href=document.getElementById("pImage_0").src

Link for drag'n'drop bookmarking: Instagram: Reveal picture link

If you want the picture to be shown on a new tab:

javascript:window.open(document.getElementById("pImage_0").src, document.location.href)

Link for drag'n'drop bookmarking: Instagram: Reveal picture link in a new tab

It uses the picture page name as a new tab name so it won't open two tabs for the same picture.


Getting rid of the Who to follow list on Twitter

If you're like me, you've been very annoyed by that "Who to follow" list Twitter introduced some time ago. Such addition was well-intentioned as a means for new users to find new accounts to follow, but Twitter old-timers know that the best recommendations come from those snarky RTs we get from the people we already follow. The good news is that you can make the Who to follow list go by emptying it. The bad news is that you're supposed to do it manually. I've been using this bookmarklet to empty whevener it crawls back from the oblivion I send it to periodically.

javascript:{function dismiss() { var x=document.getElementsByClassName("dismiss js-action-dismiss"); if (x[0]) x[0].click(); if (x.length) setTimeout(function() { dismiss(); }, 100); }; dismiss();}

Link for drag'n'drop bookmarking: Twitter: remove who to follow


Full-windowed video on Youtube

I don't like watching Youtube videos fullscreen. I generally get the video handle and open another window with the embed option. This allows me to have a full resizable window I can place in the most appropriate spot. This way, I can wait for the relevant parts of the video while reading and doing other things, especially in those videos that are just some lines of text read aloud.

javascript:var v="",s=location.search.split("&");for(i=0;i<s.length;i++) if (s[i].indexOf("v=")!=-1) {v=s[i];break;} location.href="https://youtube.com/embed/"+v.split("=")[1];

Link for drag'n'drop bookmarking: Youtube: full-windowed video