Created
          July 17, 2021 20:38 
        
      - 
      
- 
        Save Christopher-Hayes/66bc13151c363909ada2a8a0faacba4c to your computer and use it in GitHub Desktop. 
    Hide GlassDoor Hardsell Popup - ViolentMonkey Script
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // ==UserScript== | |
| // @name Hide hardsell - glassdoor.com | |
| // @namespace Violentmonkey Scripts | |
| // @match https://www.glassdoor.com/* | |
| // @version 1.0 | |
| // @author @christopher-hayes | |
| // @description Hide the hardsell popup on Glassdoor | |
| // ==/UserScript== | |
| function killHardSell() { | |
| document.body.style.height = 'unset'; | |
| document.body.style.overflow = 'unset'; | |
| document.querySelector('#HardsellOverlay').parentElement.removeChild(document.querySelector('#HardsellOverlay')); | |
| window.onscroll = null; | |
| } | |
| const checkForHardSell = function() { | |
| // Uses Facebook Login Button to know when the hardsell is fully loaded | |
| if (document.body.contains(document.querySelector('#FbButton'))) { | |
| console.log('hardsell - KILL'); | |
| killHardSell(); | |
| } else { | |
| console.log('hardsell - not found, wait 500ms...'); | |
| setTimeout(checkForHardSell, 500); | |
| } | |
| } | |
| console.log('hardsell - start looking'); | |
| checkForHardSell(); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Update: I switched to using the "Bypass Paywalls Clean" extension on Chrome and Firefox to bypass hardsells across dozens of sites.