Skip to content

Instantly share code, notes, and snippets.

@ShivrajRath
Last active January 5, 2022 19:41
Show Gist options
  • Save ShivrajRath/12b1516c85bec5f56ef76c4f9f422c65 to your computer and use it in GitHub Desktop.
Save ShivrajRath/12b1516c85bec5f56ef76c4f9f422c65 to your computer and use it in GitHub Desktop.
javascript:(function()%7Bconst%20%24html%20%3D%20document.querySelector(%22html%22)%3Bconst%20%24body%20%3D%20document.querySelector(%22body%22)%3B%24html.style.overflowY%20%3D%20%22scroll%22%3B%24html.style.overflow%20%3D%20%22scroll%22%3B%24body.style.overflowY%20%3D%20%22scroll%22%3B%24body.style.overflow%20%3D%20%22scroll%22%3Bdocument.querySelectorAll(%22*%22).forEach((el)%20%3D%3E%20%7Bconst%20cs%20%3D%20getComputedStyle(el)%3Bconst%20elPos%20%3D%20cs.position%3Bconst%20filter%20%3D%20cs.filter%3Bif%20(%5B%22fixed%22%2C%20%22sticky%22%5D.includes(elPos))%20%7Bel.parentNode.removeChild(el)%3B%7Dif%20(filter%20%26%26%20filter.match(%2Fblur%2F))%20%7Bel.style.setProperty(%22filter%22%2C%20%22none%22)%3B%7D%7D)%7D)()
const $html = document.querySelector("html");
const $body = document.querySelector("body");
$html.style.overflowY = "scroll";
$html.style.overflow = "scroll";
$body.style.overflowY = "scroll";
$body.style.overflow = "scroll";
document.querySelectorAll("*").forEach((el) => {
const cs = getComputedStyle(el);
const elPos = cs.position;
const filter = cs.filter;
if (["fixed", "sticky"].includes(elPos)) {
el.parentNode.removeChild(el);
}
if (filter && filter.match(/blur/)) {
el.style.setProperty("filter", "none");
}
});
@ShivrajRath
Copy link
Author

Copy the stickyPopUpRemove-bookmarklet.js and add it to a bookmark on your browser

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