feat: add scripts

This commit is contained in:
2023-08-22 01:28:47 +07:00
parent 7fe79a2bdb
commit 92c0e0ee6c
19 changed files with 581 additions and 438 deletions

View File

@ -13,19 +13,24 @@
// ==/UserScript==
// Remove the "download app ads"
const dlClasses = ["tiktok-9er52i-DivCtaGuideWrapper", "tiktok-99ed1t-DivFooterGuide", "tiktok-txik7e-DivFloatButtonWrapper", "tiktok-h0mxry-DivCtaContentWrapper"]
const dlClasses = [
"tiktok-9er52i-DivCtaGuideWrapper",
"tiktok-99ed1t-DivFooterGuide",
"tiktok-txik7e-DivFloatButtonWrapper",
"tiktok-h0mxry-DivCtaContentWrapper",
];
setInterval(() => {
for (const dlClass of dlClasses) {
const element = document.getElementsByClassName(dlClass)[0]
if (element === undefined) {
continue
}
for (const childElm of element.children) {
console.log(childElm)
setTimeout(() => element.removeChild(childElm), 1)
}
element.style["height"] = "0px"
element.style["padding"] = "0px"
element.style["z-index"] = "-1"
for (const dlClass of dlClasses) {
const element = document.getElementsByClassName(dlClass)[0];
if (element === undefined) {
continue;
}
}, 50)
for (const childElm of element.children) {
console.log(childElm);
setTimeout(() => element.removeChild(childElm), 1);
}
element.style["height"] = "0px";
element.style["padding"] = "0px";
element.style["z-index"] = "-1";
}
}, 50);