javascript:(function(){ var a = document.getElementsByTagName('a'); var arr = ''; for(var i = 0; i < a.length; i++){ if(a[i].ping && !a[i].href.includes('google')){ arr += ('<span>' + a[i].href + '</span><br>'); } } var newWindow = window.open(); var contentDiv = newWindow.document.createElement('div'); contentDiv.innerHTML = arr; var copyBtn = newWindow.document.createElement('button'); copyBtn.innerHTML = 'Copy All Urls'; copyBtn.style.width = '300px'; copyBtn.style.height = '70px'; copyBtn.style.fontSize = '30px'; copyBtn.onclick = function() { var range = newWindow.document.createRange(); range.selectNodeContents(contentDiv); var selection = newWindow.getSelection(); selection.removeAllRanges(); selection.addRange(range); newWindow.document.execCommand('copy'); alert('Content copied to clipboard!'); }; newWindow.document.body.appendChild(copyBtn); newWindow.document.body.appendChild(contentDiv); })();
Here's an example of what your results could look like:
If you didn't understand the procedure, you can watch this screen recording video: