Skip to content

Instantly share code, notes, and snippets.

@rachelbaker
Created July 24, 2017 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rachelbaker/b00f888ca8ec0d90b1fbaf74d6332c14 to your computer and use it in GitHub Desktop.
Save rachelbaker/b00f888ca8ec0d90b1fbaf74d6332c14 to your computer and use it in GitHub Desktop.
Get all Wirecutter affiliate links from within Chrome
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