eeework.com Element Blocker

Block specified elements and modify class attribute on eeework.com

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         eeework.com Element Blocker
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Block specified elements and modify class attribute on eeework.com
// @match        http://eeework.com/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Check if the current site is eeework.com
    if (window.location.hostname === 'eeework.com') {
        // Find the first specified element by its CSS selector
        var overlayElement = document.querySelector("#app > div.v-overlay.v-overlay--active.theme--dark");
        // Find the second specified element by its CSS selector
        var dialogContentElement = document.querySelector("#app > div.v-dialog__content.v-dialog__content--active");

        // If the overlay element exists, hide it
        if (overlayElement) {
            overlayElement.style.display = "none";
        }

        // If the dialog content element exists, hide it
        if (dialogContentElement) {
            dialogContentElement.style.display = "none";
        }

        // Modify the class attribute of the specified element
        var mainElement = document.querySelector("html");
        if (mainElement) {
            // Check if the class attribute contains "overflow-y-hidden"
            if (mainElement.classList.contains("overflow-y-hidden")) {
                // Remove the "overflow-y-hidden" class
                mainElement.classList.remove("overflow-y-hidden");
            }
            // Add an empty class if the attribute doesn't exist
            else {
                mainElement.classList.add("");
            }
        }
         // Allow scrolling
        document.body.style.overflow = "auto";
    }
})();