This is simple bookmarklet that saves all links on page to links.txt and allows custom regex or wildcard * for all links.
javascript:(()=>{let r=prompt("Enter regex/string (* = all)");if(!r)return;let re=r=="*"?null:new RegExp(r,"gi"),l=[...document.links].map(a=>a.href).filter(u=>!re||u.match(re)),u=[...new Set(l)];let f=prompt("Filename","links.txt");if(f){let a=document.createElement('a');a.href='data:text/plain,'+encodeURIComponent(u.join("\n"));a.download=f;a.click();}})();
You must log in or register to comment.
