Skip to content

Instantly share code, notes, and snippets.

@baptiste-roullin
Last active August 16, 2022 11:38
Show Gist options
  • Save baptiste-roullin/e5aa80e81eea3bca009ccaf90ba5905a to your computer and use it in GitHub Desktop.
Save baptiste-roullin/e5aa80e81eea3bca009ccaf90ba5905a to your computer and use it in GitHub Desktop.
Open the Firefox or Chrome Devtools, select an element and execute the script, wich copies to the clipboard the text of similar elements. You may need to tweak the CSS selector.
let a=[];
selector = "." + $0.className.replace(/\s/g, '.');
Array.from($$(selector)).forEach(function(el){a.push(el.textContent)});
let output = a.join('\n');
console.log(output);
copy(output);
//copy([...document.querySelectorAll(".task-container__name")].map(el => el.textContent).join('\n'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment