TikTok Clean-up

tiktok optimizer

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         TikTok Clean-up
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  tiktok optimizer
// @author       torch
// @match        https://www.tiktok.com/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    const styles = `
        /* === TikTok Clean-up === */

        /* 1. Убрать скелетную анимацию (загрузочные заглушки) */
        .skeleton,
        .skeleton-loader,
        .placeholder-animation,
        .loading-skeleton,
        [class*="skeleton"],
        .animated-background,
        canvas[class*="CanvasMediaCardPlaceholder"] {
            display: none !important;
        }

        .skeleton-loader {
            display: none !important;
        }

        * {
            animation-timing-function: step-start !important;
            transition-timing-function: step-start !important;
        }

        .skeleton, .skeleton-loader, .placeholder, [class*="skeleton"], [class*="placeholder"] {
            animation: none !important;
        }

        /* 2. Убрать размытый фон за видео (может повысить производительность) */
        .css-1fyv5a5-0be0dc34--Box {
            display: none !important;
        }

        /* 3. Заблокировать всплывающее окно с предложением войти */
        .css-a41xxz-0be0dc34--DivModalContainer {
            display: none !important;
        }

        /* 4. Скрыть баннер с предложением скачать приложение */
        .css-133cvxd-0be0dc34--DivTopRightContainer {
            display: none !important;
        }

        /* 5. Скрыть баннер о файлах cookie (если он все еще появляется) */
        .tiktok-cookie-banner {
            display: none !important;
        }
    `;

    const styleSheet = document.createElement("style");
    styleSheet.type = "text/css";
    styleSheet.innerText = styles;
    document.head.appendChild(styleSheet);
})();