// ==UserScript== // @name Hide bullshit on filmweb.pl // @version 1.0 // @description Hides annoying sections on filmweb.pl // @author cphx // @homepage none // @icon https://filmweb.pl/favicon.ico // @match https://www.filmweb.pl/* // @run-at document-end // @namespace https://greasyfork.org/users/1080913 // @downloadURL none // ==/UserScript== if (location.pathname !== "/") { const addGlobalStyle = (css) => { const style = document.createElement("style"); style.type = "text/css"; style.innerHTML = css; document.head.appendChild(style); }; // add exception for pages /season/$/discussion/ for g4 if (!/^\/serial\/.*\/season\/.*\/discussion\//.test(location.pathname)) { addGlobalStyle(` .page__wrapper--grid [data-group=g4].page__group, .page__wrapper--grid [data-group=g8].page__group { display: none !important; } `); } // add exception for g5 and hide section on /person/ if (!/^\/person\//.test(location.pathname)) { addGlobalStyle(` .page__wrapper--grid [data-group=g5].page__group { display: none !important; } `); } else { addGlobalStyle(` .page__section.latestTrailerSection.LatestTrailerSection.hasMobileFa.section.isReady { display: none !important; } `); } addGlobalStyle(` .page__wrapper--grid [data-group=g9].page__group, .siteFooterSection, .page__wrapper--grid [data-group=g13].page__group { display: none !important; } `); }