eeework.com Element Blocker

Block specified elements and modify class attribute on eeework.com

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo 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         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";
    }
})();