SoFunction
Updated on 2025-03-10

Example of using blocking in js


/** Block F1 Help */
= function(){return false;}
/**
*Shift F5, Ctrl+N, Shift+F10, Alt+F4
*If you want to block other keys, find the corresponding keyCode and follow this method
*/
= function(event){
event = || event;
if(==116 || ( && ==78) || ( && ==121) || ( && ==115)){
=0;
= false;
}
}
/** Right-click on the mouse */
= function(){return false;}
//or
= function(event){
event = || event;
if( && == 2) {
=false;
}
}
/**
* Block the "back" function (<a href="javascript:replaceLocation('')" mce_href="javascript:replaceLocation('')">Google</a>)
* @param url The URL to which the page is to be turned
*/
function replaceLocation(url){
(url);
}
/** Block selected web page content */
=function(){return false;}
/** Block copy web page content */
= function(){return false;}
/** Block cut web page content */
= function(){return false;}
/** Block paste content to web page */
= function(){return false;}
/** Blocked copy screen (constantly clearing the clipboard) */
('("Text", "")', 100);
/**
* Block the source file ( <body onload=clear()> )
*/
function clear() {
var source=;
();
();
= source;
}
/**
* Block js error
*/
function KillError()
{
return true;
}
=KillError;