Created
August 5, 2014 10:29
-
-
Save mhemmings/63096dcef58b11a3b558 to your computer and use it in GitHub Desktop.
Enable <a> links in Chrome extension pop-ups.
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
var aTags = document.getElementsByTagName('a'); | |
for (var i = 0; i < aTags.length; i++) { | |
aTags[i].addEventListener('click', function (e) { | |
chrome.tabs.create({url: e.target.href}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment