Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Copy All Unique RICs from a Pagermon Searchresult Page to Clipboard
var copyToClipboard = str => {
const el = document.createElement('textarea');
el.value = str;
el.setAttribute('readonly', '');
el.style.position = 'absolute';
el.style.left = '-9999px';
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
};
copyToClipboard([...new Set([...new Set(document.querySelectorAll("#content > ng-view > div:nth-child(3) > table > tbody > tr > td:nth-child(4) > span > strong"))].map(x=>x.innerText))].join('\n'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment