Skip to content

Instantly share code, notes, and snippets.

Created May 8, 2015 02:17
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save CodyKochmann/0811102ae41d2c48cabc to your computer and use it in GitHub Desktop.
bookmarklet that covers the screen with a touch interphase that can be used to delete
(function() {
// covers the screen with a touch interphase that can be used to delete
// elements in the way. This is purposed to be a manual type of adblock
// author: Cody Kochmann
var div = document.createElement("div"); = 'page_cleaner544';
div.innerHTML = "<div id='click_remover' style='width:" + window.outerWidth.toString() + "px; height:" + window.outerHeight.toString() + "px; background : rgba(50,50,50,0.1); position:fixed; z-index:2147483646; top:0; left:0;'></div>";
div.innerHTML += "<style>#close_cleaner{position:fixed;height:auto;padding:0.15in 0;width:2in;bottom:0.5in;left:0.5in;background:rgba(250,250,250,0.85);-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;color:rgba(50,50,50,0.65);text-align:center;z-index:2147483647;}</style><p id='close_cleaner'>Done</p>";
var click_remover = document.getElementById('click_remover');
click_remover.addEventListener('click', function(e) {
var old_height =; = "0px";
var target = document.elementFromPoint(e.pageX, e.pageY); = "0.5s";; = old_height;
}, 500, target);
} catch(e){
var o=0;
}, false);
var close_cleaner = document.getElementById('close_cleaner');
close_cleaner.addEventListener('click', function(e) {
var t = document.getElementById("page_cleaner544");
} catch(e){
var o=0;
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment