fripon / Remove Glassdoor Loginwall

// ==UserScript==
// @name            Remove Glassdoor Loginwall
// @description     Pretty self-explanatory. Removes Glassdoor's loginwall.
// @version         1.0
// @author          fripon
// @match           https://www.glassdoor.fr/*
// @match           https://www.glassdoor.com/*
// @match           https://www.glassdoor.be/*
// @match           https;//www.glassdoor.ch/*
// @match           https://www.glassdoor.ca/*
// @match           https://www.glassdoor.de/*

// @license         MIT
// @grant           none
// ==/UserScript==

function removeElementsByClass(className){
    const elements = document.getElementsByClassName(className);
    while(elements.length > 0){
        elements[0].parentNode.removeChild(elements[0]);
    }
}

removeElementsByClass('hardsellContainer');
removeElementsByClass('hardsellOverlay');
removeElementsByClass('hardsell.py-xl');

function addGlobalStyle(css) {
    var body, style;
    body = document.getElementsByTagName('body')[0];

    if (!body) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    body.appendChild(style);
}

addGlobalStyle('body {height:auto !important;}');
addGlobalStyle('body {overflow:auto !important;}');
addGlobalStyle('body {position:static !important;}');