Created
July 24, 2017 21:13
-
-
Save rachelbaker/b00f888ca8ec0d90b1fbaf74d6332c14 to your computer and use it in GitHub Desktop.
Get all Wirecutter affiliate links from within Chrome
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
jQuery( document ).ready(function() { | |
var affLinks = []; | |
jQuery('a').each(function() { | |
if (jQuery(this).is('[href*="wclink"]')) { | |
affLinks.push( jQuery(this).attr('href') ); | |
} | |
}); | |
console.log( affLinks ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment