4 ms·
Also useful, boorkmarklet to make all text black: javascript:(function(){var%20i,x;for(i=0;x=document.getElementsByTagName("*")[i];++i)x.style.color="#0000
by retSava 9y ago
Also useful, boorkmarklet to make all text black:
javascript:(function(){var%20i,x;for(i=0;x=document.getElementsByTagName("*")[i];++i)x.style.color="#000000";})();
and to allow text selection (I manically select text while reading, sorry fellow office inhabitants),
javascript:(function(){function%20allowTextSelection(){window.console&&console.log('allowTextSelection');var%20style=document.createElement('style');style.type='text/css';style.innerHTML='*,p,div{user-select:text%20!important;-moz-user-select:text%20!important;-webkit-user-select:text%20!important;}';document.head.appendChild(style);var%20elArray=document.body.getElementsByTagName('*');for(var%20i=0;i<elArray.length;i++){var%20el=elArray[i];el.onselectstart=el.ondragstart=el.ondrag=el.oncontextmenu=el.onmousedown=el.onmouseup=function(){return%20true};if(el%20instanceof%20HTMLInputElement&&['text','password','email','number','tel','url'].indexOf(el.type.toLowerCase())>-1){el.removeAttribute('disabled');el.onkeydown=el.onkeyup=function(){return%20true};}}}allowTextSelection();})();
- zerkten 9y agoThis doesn't undo text selection disabled by following: http://www.rgagnon.com/jsdetails/js-0120.html http://www.rgagnon.com/jsdetails/js-0120.html.
- retSava 9y agoThanks! Updated the bookmarklet (used both IE and FF methods from the link): javascript:(function(){function%20allowTextSelection(){document.onselectstart = null; document.onmousedown = null; document.onmouseup = null; window.console&&console.log('allowTextSelection');var%20style=document.createElement('style');style.type='text/css';style.innerHTML='*,p,div{user-select:text%20!important;-moz-user-select:text%20!important;-webkit-user-select:text%20!important;}';document.head.appendChild(style);var%20elArray=document.body.getElementsByTagName('*');for(var%20i=0;i<elArray.length;i++){var%20el=elArray[i];el.onselectstart=el.ondragstart=el.ondrag=el.oncontextmenu=el.onmousedown=el.onmouseup=function(){return%20true};if(el%20instanceof%20HTMLInputElement&&['text','password','email','number','tel','url'].indexOf(el.type.toLowerCase())>-1){el.removeAttribute('disabled');el.onkeydown=el.onkeyup=function(){return%20true};}}}allowTextSelection();})();