Hide Tumblr Elements

Hide specific Tumblr elements by class names and selectors

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Hide Tumblr Elements
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Hide specific Tumblr elements by class names and selectors
// @author       LeoTruza
// @match        *://www.tumblr.com/*
// @grant        none
// @license MIT 
// ==/UserScript==

(function() {
    'use strict';

    // Function to hide elements by their CSS class names
    function hideElements() {
        // Hide element
        const hlDotElements = document.querySelectorAll('.hlDot');
        hlDotElements.forEach(element => {
            element.style.display = 'none';
        });

        // Hiding Some More Elements 
        const headerElements = document.querySelectorAll('header._3kR_');
        headerElements.forEach(element => {
            element.style.display = 'none';
        });

        // Additional selectors to hide
        const additionalSelectors = [
            '.wttFd',
            '.BSUG4.WaV4Y.wmRou',
            '.kk3cQ.f68ED.EvhBA',
            '.Mk7yS.SbeG8',
            '.Ut4iZ > .BPf9u',
            'aside > div.FZkjV > div > .hF8Wr',
            '.PwJi6',
            '.I_SFh',
            '[href="/about"]',
            '[href="/apps"]',
            '[href="/policy/terms-of-service"]',
            '[href="/policy/privacy"]',
            '[href="/help"]',
            '.EcpO3.TRX6J > .EvhBA > svg',
            '.JhOLN.TRX6J',
            '.qKOfy',
            '.VHoKL',
            '.McUMJ.YmIEY',
            '.w8SBf.Z2xdy',
            '.gUAKZ',
            '.rR_oZ.KDoiW',
            'div.W45iW.KYCZY.rZlUD:nth-of-type(11)'
        ];
        // Hiding the Rest Of the Elements
        additionalSelectors.forEach(selector => {
            const elements = document.querySelectorAll(selector);
            elements.forEach(element => {
                element.style.display = 'none';
            });
        });
    }

    // Run the function when the DOM is fully loaded
    window.addEventListener('load', hideElements);
    document.addEventListener('pjax:end', hideElements);  // For Tumblr's dynamic page loading
})();