i asked this question where i tried to make a JS script that automatically captures links in buttons in downlaod page of edge and save them to clipboard but another problem popped up, the string copied contains only first 5 or 6 links (There are hundreds of links in the page with scrolling aility 'on')
code:
function findButton() {
var buttons = document.querySelectorAll('button');
var arr = [];
for (var i = 0; i < 100 ;i++) {
var elem = buttons[i++];
var text = elem.textContent || elem.innerText;
arr.push(text);
}
return arr
}
var x = findButton().toString();
setTimeout(function(){navigator.clipboard.writeText(x);},5000);
alert(x);
inspect element:
<button class="c01209" id="open_link774" role="link" aria-label="https://link.springer.com/content/pdf/10.1007%2F978-94-007-2464-8.pdf">https://link.springer.com/content/pdf/10.1007%2F978-94-007-2464-8.pdf</button>