I downloaded a bit of books on edge, but sadly the browser stopped showing visited links in purple and i don't want to download duplicate files (edge just renames duplicate files and other download managers just download it then ask you what to do). So i resorted to a javascript code that can ust catch all links in download page of edge and export them to an external file where i will program another script to compare the links in this file with what is open
JS code:
function findButton() {
var buttons = document.querySelectorAll('button');
for (var i = 0; i < buttons.length; i++) {
var elem = buttons[i];
var text = elem.textContent || elem.innerText;
if (text.includes("htt")){}
else {text = 0;}
return text
}
}
var x = findButton();
alert(x);
inspect elements:
<button class="c0124348" id="open_link292" role="link" aria-label="https://onlinelibrary.wiley.com/doi/pdfdirect/10.1002/9780470132586">https://onlinelibrary.wiley.com/doi/pdfdirect/10.1002/9780470132586</button>
the sript returns only the value of first button which is (download list button) = 0.
NOTE:
nothing is static in the attributes and class name of the buttons (classnames and ids change)
if you have a simpler solution to this problem (a download manger that checks if download file is already present in the destination or any other solution) then i would like to try it.