scripts/userscripts/anonyviet-skip-wait.user.js

28 lines
956 B
JavaScript
Raw Permalink Normal View History

2023-06-28 19:23:18 +00:00
// ==UserScript==
// @name Anonyviet.com skip wait page
// @namespace tretrauit-dev
// @match *://anonyviet.com/*
// @grant none
// @version 1.0
// @author tretrauit
// @description Skip the wait page that forces you to wait 15 seconds before redirecting to the destination page.
// @run-at document-idle
// @homepageURL https://gitlab.com/tretrauit/scripts
// @supportURL https://gitlab.com/tretrauit/scripts/-/issues
2024-03-06 16:48:06 +00:00
// @downloadURL https://git.tretrauit.me/tretrauit/scripts/raw/branch/main/userscripts/anonyviet-skip-wait.user.js
2023-06-28 19:23:18 +00:00
// ==/UserScript==
2023-08-21 18:28:47 +00:00
const REDIRECT_PAGE = "https://anonyviet.com/tieptucdentrangmoi/?url=";
2023-06-28 19:23:18 +00:00
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 (_) {}
2023-06-28 19:23:18 +00:00
}