Skip to content

Instantly share code, notes, and snippets.

@se79419ed
Created January 7, 2021 15:39
Show Gist options
  • Star 26 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save se79419ed/03e0716b6868dc3c9ac6b128965c4733 to your computer and use it in GitHub Desktop.
Save se79419ed/03e0716b6868dc3c9ac6b128965c4733 to your computer and use it in GitHub Desktop.
bookmarklet to remove hardsell overlay from glassdoor.com
javascript:(function(){
document.getElementsByClassName('hardsellOverlay')[0].remove();
document.getElementsByTagName("body")[0].style.overflow = "scroll";
let style = document.createElement('style');
style.innerHTML = `
#LoginModal {
display: none!important;
}
`;
document.head.appendChild(style);
window.addEventListener("scroll", function (event) {
event.stopPropagation();
}, true);
})();
@jwarner112
Copy link

Hey, thanks for this! Just had to use it myself. I had to modify line 2:

document.getElementById("ContentWallHardsell").remove():

Besides that, it worked great!

@adriangroch
Copy link

Adding document.getElementsByTagName('body')[0].style.position = 'unset' re-allows scrolling

@marcustw
Copy link

marcustw commented Mar 28, 2023

A new updated script that combines the above solutions.

javascript:(function() {
  let hardOverlay = document.getElementsByClassName('hardsellOverlay')[0];
  if (hardOverlay) {
    hardOverlay.remove();
  }
  document.getElementsByTagName("body")[0].style.overflow = "scroll";
  document.getElementsByTagName('body')[0].style.position = 'unset'
  let style = document.createElement('style');
  style.innerHTML = `
    #LoginModal {
      display: none!important;
    }
  `;
  document.head.appendChild(style);
  window.addEventListener("scroll", function (event) {
    event.stopPropagation();
  }, true);
})();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment