Created
November 16, 2017 23:00
-
-
Save butchhoward/ec971481c1c9d03c31d7a34ac17e9bab to your computer and use it in GitHub Desktop.
google bookmarks - make bookmark links open in a new tab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MakeBookmarkLinksOpenInNewWindow() { | |
if (window.location.href.includes('/bookmarks/')) { | |
var links = document.getElementsByTagName("a"); | |
for (var i = 0; i < links.length; i++) { | |
if (links[i].href.startsWith("https://www.google.com/url")) { | |
links[i].target = "_blank"; | |
} | |
} | |
} | |
} | |
MakeBookmarkLinksOpenInNewWindow(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment