Created
July 28, 2016 13:05
-
-
Save kandebonfim/43a7714d98772fd4991ccf41ad7de545 to your computer and use it in GitHub Desktop.
Search for links containing an specific string in a webpage
This file contains hidden or 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 str = 'www.maybeyourwebsite.here' | |
document.querySelectorAll('a').forEach(function(e) { | |
if (e.href.indexOf(str) > 0) { | |
console.log(e.href) | |
}; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment