(function() {
var doc = document;
var body = doc.body;
var html = doc.documentElement;
html.onselectstart = html.oncopy = html.oncut = html.onpaste = html.onkeydown = html.oncontextmenu = html.onmousemove = body.oncopy = body.oncut = body.onpaste = body.onkeydown = body.oncontextmenu = body.onmousemove = body.onselectstart = body.ondragstart = doc.onselectstart = doc.oncopy = doc.oncut = doc.onpaste = doc.onkeydown = doc.oncontextmenu = doc.onmousedown = doc.onmouseup = null;
body.style.webkitUserSelect = 'auto';
function defaultHandler(event) {
event.returnValue = true;
}
for (event_type in ['selectstart', 'copy', 'cut', 'paste', 'keydown', 'contextmenu', 'dragstart']) {
html.addEventListener(event_type, defaultHandler);
body.addEventListener(event_type, defaultHandler);
doc.addEventListener(event_type, defaultHandler);
}
var jQuery = window.jQuery;
if (jQuery) {
jQuery(doc).unbind();
jQuery(body).unbind();
}
var $Fn = window.$Fn;
if ($Fn) {
try {
$Fn.freeElement(doc);
$Fn.freeElement(body);
} catch (e) {}
}
var jindo = window.jindo;
if (jindo) {
jindo.$A = null;
}
})();
---------------------------------------------------------
減肥版
(function() {var doc = document;var body = doc.body;var html = doc.documentElement;html.onselectstart = html.oncopy = html.oncut = html.onpaste = html.onkeydown = html.oncontextmenu = html.onmousemove = body.oncopy = body.oncut = body.onpaste = body.onkeydown = body.oncontextmenu = body.onmousemove = body.onselectstart = body.ondragstart = doc.onselectstart = doc.oncopy = doc.oncut = doc.onpaste = doc.onkeydown = doc.oncontextmenu = doc.onmousedown = doc.onmouseup = null;body.style.webkitUserSelect = 'auto';function defaultHandler(event) { event.returnValue = true;}for (event_type in ['selectstart', 'copy', 'cut', 'paste', 'keydown', 'contextmenu', 'dragstart']) { html.addEventListener(event_type, defaultHandler); body.addEventListener(event_type, defaultHandler); doc.addEventListener(event_type, defaultHandler);}var jQuery = window.jQuery;if (jQuery) { jQuery(doc).unbind(); jQuery(body).unbind();}var $Fn = window.$Fn;if ($Fn) { try { $Fn.freeElement(doc); $Fn.freeElement(body); } catch (e) {}}var jindo = window.jindo;if (jindo) {jindo.$A = null;}})();
2014年4月20日 星期日
訂閱:
張貼留言 (Atom)
0 意見:
張貼留言