t.co elide ellipsis
parent
d75a9672cd
commit
9ba43107fd
|
@ -3,7 +3,7 @@
|
||||||
// @run-at document-start
|
// @run-at document-start
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
function mkurl(txt){if(!/^http/.test(txt)){txt = "https://"+txt}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){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());}
|
||||||
|
|
Loading…
Reference in New Issue