scripts/userscripts/tiktok.user.js

37 lines
1.1 KiB
JavaScript
Raw Normal View History

2023-06-29 19:28:00 +00:00
// ==UserScript==
// @name TikTok+
// @namespace tretrauit-dev
// @match *://www.tiktok.com/*
// @grant none
// @version 1.0
// @author tretrauit
// @description TikTok utilities.
// @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/tiktok.user.js
2023-06-29 19:28:00 +00:00
// ==/UserScript==
// Remove the "download app ads"
2023-08-21 18:28:47 +00:00
const dlClasses = [
"tiktok-9er52i-DivCtaGuideWrapper",
"tiktok-99ed1t-DivFooterGuide",
"tiktok-txik7e-DivFloatButtonWrapper",
"tiktok-h0mxry-DivCtaContentWrapper",
2023-08-21 18:28:47 +00:00
];
2023-06-29 19:28:00 +00:00
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";
}
2023-08-21 18:28:47 +00:00
}, 50);