Skip to content

Instantly share code, notes, and snippets.

@mvark
Created May 9, 2021 06:54
Show Gist options
  • Save mvark/63758b88c7f957bbb3fbace6da816451 to your computer and use it in GitHub Desktop.
Save mvark/63758b88c7f957bbb3fbace6da816451 to your computer and use it in GitHub Desktop.
IMDb Search bookmarklet inspired by the Wikipedia Search bookmarklet code here - https://en.wikipedia.org/wiki/Bookmarklet
javascript:(function() {
function se(d) {
return d.selection ? d.selection.createRange().text : d.getSelection()
}
s = se(document);
//for (i=0; i<frames.length && (s==null || s==''); i++) s = se(frames[i].document);
if (!s || s=='') s = prompt('Enter%20search%20terms%20for%20IMDb','');
open('https://m.imdb.com/find?q=' + s).focus();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment