Skip to content

Instantly share code, notes, and snippets.

@jakeisonline
Last active May 1, 2019 22:28
Show Gist options
  • Select an option

  • Save jakeisonline/4b52650f9ed2a727d766 to your computer and use it in GitHub Desktop.

Select an option

Save jakeisonline/4b52650f9ed2a727d766 to your computer and use it in GitHub Desktop.
Outputs selected story URLs and their titles to the JS console for easy copy and paste
var stories = 'Selected stories: \n\n';
jQuery("#ghx-content-group .ghx-selected")
.each(function(i, elem) {
var href = jQuery(elem).find(".ghx-end a").prop('href'),
title = jQuery(elem).find(".ghx-summary").text(),
type = jQuery(elem).find(".ghx-type").prop('title');
stories += '[' + type + '] ' + title + "\n" + href + "\n\n";
});
console.log(stories);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment