Guide | Useful Bookmarklets π
-
Other
Guides
Hi,
Here it's a list of websites with useful Bookmarklets.
There's a
Bookmarklets Bug, so they would need some more steps to be added and running.
--
about:blank#blocked
Add a New Bookmark, Copy/paste the code to the URL.Edit:
Add an Space at the beginning before paste.
Old Sites - Some Bookmarklets doesn't work
New Sites
Dev
-
I really enjoy the Kill Sticky Headers bookmarklet. I wonder if that could ever be incorporated as a Vivaldi page action? It's really nice to clean up some websites, news sites are some of the worst offenders I've seen.
-
Go directly to a youtube embed page, skip the annoying website:
javascript:(function(){const video = window.location.search.substring(3,14);const embed = "https://youtube.com/embed/";window.location.href = embed + video;})();
Force a page to run PiP, if it has a video somewhere:
javascript:document.querySelector("video").requestPictureInPicture()
javascript:((function(){function%20e(t){if(t.childNodes.length){for(var%20n=0;n<t.childNodes.length;n++){e(t.childNodes[n])}}if(t.nodeType==Node.TEXT_NODE&&/\S/.test(t.nodeValue)){t.nodeValue='Ed%20Balls'}}e(document.getElementsByTagName('html')[0])})())
Rename the tab title
javascript:(function(){document.title=prompt()})()
-
Bookmarklets seem to be broken further. Drag & dropping a bookmarklet to the bookmarks bar, as well as right-click Bookmark Page still results in the bookmarklets altered url of about:blank#blocked.
Add a New Bookmark > copy/paste bookmarklet code to Url field results in Vivaldi autocorrecting the url as it appears to think it's improperly formatted. Of course this reformatting breaks the bookmarklet.
For instance, when I copy your suggested Youtube Embed Page bookmarklet:
javascript:(function(){const video = window.location.search.substring(3,14);const embed = "https://youtube.com/embed/";window.location.href = embed + video;})();
pasted into a new bookmark in Bookmark Manager, it converts to this:
(function(){const video = window.location.search.substring(3,14);const embed = "https://youtube.com/embed/";window.location.href = embed + video;})();
Tab Rename:
javascript:(function(){document.title=prompt()})()
Converts to:
http://%28function%28%29%7Bdocument.title%3Dprompt%28%29%7D%29%28%29/
The only way I have successfully been able to create a bookmarklet is manually through the Bookmarks Manager > Add New Bookmark.
- Copy bookmarklet link address.
- In the Url input box of your empty bookmark, hit the spacebar once, THEN paste the bookmarklet right after. Vivaldi will auto-remove the space but leave the url alone.
I just updated to 3.7.2202.3 on a Win64 PC and this works for me.
-
Highlight in page:
javascript:(function()%7Bconst%20selectedText%20%3D%20getSelection().toString()%3Bconst%20newUrl%20%3D%20new%20URL(location)%3BnewUrl.hash%20%3D%20%60%3A~%3Atext%3D%24%7BencodeURIComponent(selectedText)%7D%60%3Bwindow.open(newUrl)%7D)()
The Printliminator (Makes a page printer-friendly):
javascript:/*THE.PRINTLIMINATOR*/(function(){function%20loadScript(a,b){var%20c=document.createElement('script'),d=document.getElementsByTagName('head')[0],e=!1;c.type='text/javascript',c.src=a,c.onload=c.onreadystatechange=function(){e||this.readyState&&'loaded'!=this.readyState&&'complete'!=this.readyState||(e=!0,b())},d.appendChild(c)}loadScript('//css-tricks.github.io/The-Printliminator/printliminator.min.js',function(){thePrintliminator.init()});})();
Google Translate a page (since V doesn't have translation built in):
javascript:var t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection &&document.selection.createRange&&document.selection.createRange().text));var e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/translate_t?text='+t+'&hl=en&tbb=1&ie='+e;}else{location.href='http://translate.google.com/translate?u='+escape(location.href)+'&hl=en&tbb=1&ie='+e;};
Skip ad on CoolMathGames.com (It also gets rid of an "Ad-blocker detected" message):
javascript:(function(){removePrerollAndDisplayGame();document.getElementsByClassName("blocker-detected-2")[0].style.display="none";})();
Most of these I found online somewhere, except I wrote the CoolMathGames one myself.
-
Hello,
Sorry to bother you.
I would like to use the following javascript in a keyboard maestro script (I am creating a menu of bookmarklets). I saves web pages to DevonThink.
It runs perfectly in Chrome, but not with Vivaldi. In Vivaldi, I can use it as a bookmarklet if I first press the space key.
How should I modify it so it runs in as proper java script ?
thank very much
javascript:window.location='x-devonthink://createWebArchive?title='+encodeURIComponent(document.title)+'&location='+encodeURIComponent(window.location)+'&referrer='+encodeURIComponent(document.referrer);
-
Thanks for sharing the details.
-
This post is deleted! -
Force PIP,
Thanks to @DoctorG | https://forum.vivaldi.net/post/636680javascript:var%20v=document.querySelector(%22video%22);v.removeAttribute(%22disablePictureInPicture%22);v.requestPictureInPicture();if(history.replaceState)%7Bwindow.history.replaceState(%7B%7D,%22%22,location.href);%7D;
-
-
I can't add bookmarklet to Vivaldi right now. Any news on this? Adding it as a bookmark breaks the code. And even if added, I don't understand how it will work.
-
@oelma Create a bookmark in Bookmark Bar
Set as name PiP
Copy the code lines
javascript:var%20v=document.querySelector(%22video%22);v.removeAttribute(%22disablePictureInPicture%22);v.requestPictureInPicture();if(history.replaceState)%7Bwindow.history.replaceState(%7B%7D,%22%22,location.href);%7D;
Paste into URL field of created bookmark
Goto start of URL field
Add textjavascript:
Save bookmarkWhen you are on a page with a video running, when you do not see Picture-in-Picture button, hit the PiP bookmark, you will have Picture in Picture window.