Bookmarklets

Scihubify

location.href = 'https://sci-hub.tw/' + location.href

Enable Text Selection

Override evil web pages that abuse user-select: none.

(function() {
	body = document.querySelector('body');
	st = document.createElement('style');
	st.innerText = '* { user-select: auto !important }';
	body.appendChild(st);
})();

Kill Sticky

Pretty much redundant now that AlwaysKillSticky exists.

(function() {
    var i, elements = document.querySelectorAll('body *');
    for (i = 0; i < elements.length; i++) {
        position = getComputedStyle(elements[i]).position;
        if (position === 'fixed' || position === 'sticky') {
            elements[i].parentNode.removeChild(elements[i]);
        }
    }
})();

Click to Remove

Toggle a mode that kills elements when you click on them.

(function() {
    if (window._rm_md) {
        document.onmousedown = window._rm_md;
        window._rm_md = null;
    } else {
        window._rm_md = document.onmousedown || function() {};
        document.onmousedown = function(e) {
            e = e || window.event;
            e.target.parentNode.removeChild(e.target);
        };
    }
})();