exclude cards
parent
9ba43107fd
commit
71e34092cd
|
@ -4,7 +4,7 @@
|
|||
// ==/UserScript==
|
||||
|
||||
function mkurl(txt){if(!/^http/.test(txt)){txt = "https://"+txt}txt = txt.replace(/…$/, "");return txt;}
|
||||
function repllnks(lnks){for(let lnk of lnks){lnk.href = mkurl(lnk.textContent);lnk.classList.add("unshortreplaced");}}
|
||||
function repllnks(lnks){for(let lnk of lnks){if(!lnk.querySelector("div"))lnk.href = mkurl(lnk.textContent);lnk.classList.add("unshortreplaced");}}
|
||||
function getlnks(){return document.querySelectorAll("a[href^='https://t.co']:not(.unshortreplaced)");}
|
||||
function replrun(){repllnks(getlnks());}
|
||||
replrun();
|
||||
|
|
Loading…
Reference in New Issue