name:
js/trippleclick.min.js
-rw-r--r--
603
1function RemoveDocumentClick(){if(!isMouseDown){document.onclick=null;return true}tcTimer=window.setTimeout(RemoveDocumentClick,1e3);return false}function clearHighlight(){if(window.getSelection){window.getSelection().removeAllRanges()}else{if(document.selection){document.selection.empty()}}}var tcTimer=0;var isMouseDown=false;document.onmousedown=function(){isMouseDown=true};document.onmouseup=function(){isMouseDown=false};document.ondblclick=function(t){clearHighlight();window.clearTimeout(tcTimer);document.onclick=function(){clearHighlight()};tcTimer=window.setTimeout(RemoveDocumentClick,1e3)}