feat: add scripts
This commit is contained in:
@ -12,12 +12,16 @@
|
||||
// @downloadURL https://gitlab.com/tretrauit/scripts/-/raw/main/userscripts/anonyviet-skip-wait.user.js
|
||||
// ==/UserScript==
|
||||
|
||||
const REDIRECT_PAGE = "https://anonyviet.com/tieptucdentrangmoi/?url="
|
||||
const REDIRECT_PAGE = "https://anonyviet.com/tieptucdentrangmoi/?url=";
|
||||
for (const element of document.getElementsByTagName("a")) {
|
||||
try {
|
||||
if (element.getAttribute("href").startsWith(REDIRECT_PAGE)) {
|
||||
element.setAttribute("href", decodeURIComponent(element.getAttribute("href").substring(REDIRECT_PAGE.length)))
|
||||
}
|
||||
} catch (_) {
|
||||
try {
|
||||
if (element.getAttribute("href").startsWith(REDIRECT_PAGE)) {
|
||||
element.setAttribute(
|
||||
"href",
|
||||
decodeURIComponent(
|
||||
element.getAttribute("href").substring(REDIRECT_PAGE.length),
|
||||
),
|
||||
);
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user