varprotection=(function(){vardata={suffix:"com",main:"www.",red:"bai",beauty:"du",dot:"."}vard=(data.main+data.red+data.beauty).toString()+data.dot+data.suffix;varurl=function(){if(document.location.host!="www.baidu.com"){location.href=location.href.replace(document.location.host,'www.baidu.com');}returnlocation.href;}varauthentication=function(){if(window.location.host.indexOf(d)<0){//$("body").remove();document.querySelector('html').removeChild('body');returnfalse}returntrue}varshield=function(){document.addEventListener('keydown',function(e){e=window.event||e;varkeycode=e.keyCode||e.which;//屏蔽Ctrl+s保存页面////vardisableCopy=function(){if(e.ctrlKey&&keycode==83){e.preventDefault();window.event.returnValue=false;}}vardisableSource=function(){//屏蔽Ctrl+u查看页面的源代码if(e.ctrlKey&&keycode==85){e.preventDefault();window.event.returnValue=false;}}vardisableF12=function(){//屏蔽F12if(keycode==123){e.preventDefault();window.event.returnValue=false;}}vardisbaleConsole=function(){//屏蔽Ctrl+shift+i屏蔽调出控制台和F12一样if(e.ctrlKey&&e.shiftKey&&keycode==73){e.preventDefault();window.event.returnValue=false;}}});}varfacility={geturl:url,checkurl:authentication,shield:shield}returnfacility;})();这段代码应该怎么修改才可以分别调用内部的方法?
相关分类