mirror of
https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated.git
synced 2024-12-30 00:43:02 +05:00
a6aa5a531c
https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/issues/109 https://github.com/AdguardTeam/AdguardFilters/blob/master/SpanishFilter/sections/general_extensions.txt#L223
44 lines
1.5 KiB
JavaScript
44 lines
1.5 KiB
JavaScript
// ==UserScript==
|
|
// @name Acortalink.me Bypass
|
|
// @match https://acortalink.me/*
|
|
// @run-at document-start
|
|
// ==/UserScript==
|
|
|
|
// ----- Bypass Acortalink.me ( Taken from AdGuard https://github.com/AdguardTeam/AdguardFilters/commit/61d9949022b428939b5be4243b0e5331ea64afcb) -----
|
|
// used in: hackstore.fo
|
|
(function() {
|
|
'use strict';
|
|
|
|
if (/acortalink.me/.test(window.location.href)) {
|
|
|
|
//Try to click the button after the page is fully loaded
|
|
window.addEventListener('load', function() {
|
|
const popupsToRedirects = () => window.open = (url, target, features) => (window.location.href = url, window);
|
|
popupsToRedirects();
|
|
|
|
let button = document.querySelector('#contador');
|
|
if (button) {
|
|
button.click();
|
|
}
|
|
})
|
|
|
|
//Bypass logic by Adguard Team - https://github.com/AdguardTeam/AdguardFilters/commit/61d9949022b428939b5be4243b0e5331ea64afcb
|
|
window.addEventListener("message", (e => {
|
|
e?.data?.includes("__done__") && e?.data?.length < 9 && Object.defineProperty(e, "source", {
|
|
value: ""
|
|
})
|
|
}), !0);
|
|
const e = new MutationObserver((() => {
|
|
document.querySelector("a.button#contador") && (e.disconnect(), setTimeout((() => {
|
|
postMessage("__done__")
|
|
}), 100))
|
|
}));
|
|
e.observe(document, {
|
|
childList: !0,
|
|
subtree: !0
|
|
})
|
|
|
|
}
|
|
|
|
})();
|
|
// ----- ----- -----
|