exclude cards

master
Your Name 2023-06-01 19:43:41 +02:00
parent 9ba43107fd
commit 71e34092cd
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@
// ==/UserScript== // ==/UserScript==
function mkurl(txt){if(!/^http/.test(txt)){txt = "https://"+txt}txt = txt.replace(/…$/, "");return txt;} 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 getlnks(){return document.querySelectorAll("a[href^='https://t.co']:not(.unshortreplaced)");}
function replrun(){repllnks(getlnks());} function replrun(){repllnks(getlnks());}
replrun(); replrun();