eeework.com Element Blocker

Block specified elements and modify class attribute on eeework.com

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

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

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