TikTok Clean-up

tiktok optimizer

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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);
})();