Last active 1769785836

adien's Avatar adien revised this gist 1769785836. Go to revision

1 file changed, 14 insertions

copy_selection_link.js(file created)

@@ -0,0 +1,14 @@
1 + (() => {
2 + // Finds all links inside table cells that have the 'sel' class
3 + const links = Array.from(document.querySelectorAll('.sel a[href^="/download/"]'))
4 + .map(a => a.href);
5 +
6 + if (links.length > 0) {
7 + const output = links.join('\n');
8 + copy(output);
9 + console.log(`✅ ${links.length} links copied!`);
10 + console.table(links);
11 + } else {
12 + console.warn("No links found in selected rows. Try running: console.log(document.querySelectorAll('.sel')) to check the class name.");
13 + }
14 + })();
Newer Older