Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Copy article titles and links from browser console.
var items = document.querySelectorAll('div.discuss-main.clearfix');
var articles = new Array();
items.forEach(element => {
var href = element.childNodes[0].href;
var title = element.childNodes[0].innerText;
var article = title + ' ' + href;
articles.push(article);
});
copy(articles);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment