/*-------------------
*Description:        By www.yiwuku.com
*Website:            https://app.zblogcn.com/?id=842
*Author:             尔今 erx@qq.com
*update:             2020-01-29(Last:2022-11-20)
-------------------*/




/*

11111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111001111111111111111111111111
11111111111111111111111111111111111100011111111111111111111111111
11111111111111111111111111111111100001111111111111111111111111111
11111111111111111111111111111110000111111111111111111111111111111
11111111111111111111111111111000000111111111111111111111111111111
11111111111111111111111111100000011110001100000000000000011111111
11111111111111111100000000000000000000000000000000011111111111111
11111111111111110111000000000000000000000000000011111111111111111
11111111111111111111111000000000000000000000000000000000111111111
11111111111111111110000000000000000000000000000000111111111111111
11111111111111111100011100000000000000000000000000000111111111111
11111111111111100000110000000000011000000000000000000011111111111
11111111111111000000000000000100111100000000000001100000111111111
11111111110000000000000000001110111110000000000000111000011111111
11111111000000000000000000011111111100000000000000011110001111111
11111110000000011111111111111111111100000000000000001111100111111
11111111000001111111111111111111110000000000000000001111111111111
11111111110111111111111111111100000000000000000000000111111111111
11111111111111110000000000000000000000000000000000000111111111111
11111111111111111100000000000000000000000000001100000111111111111
11111111111111000000000000000000000000000000111100000111111111111
11111111111000000000000000000000000000000001111110000111111111111
11111111100000000000000000000000000000001111111110000111111111111
11111110000000000000000000000000000000111111111110000111111111111
11111100000000000000000001110000001111111111111110001111111111111
11111000000000000000011111111111111111111111111110011111111111111
11110000000000000001111111111111111100111111111111111111111111111
11100000000000000011111111111111111111100001111111111111111111111
11100000000001000111111111111111111111111000001111111111111111111
11000000000001100111111111111111111111111110000000111111111111111
11000000000000111011111111111100011111000011100000001111111111111
11000000000000011111111111111111000111110000000000000011111111111
11000000000000000011111111111111000000000000000000000000111111111
11001000000000000000001111111110000000000000000000000000001111111
11100110000000000001111111110000000000000000111000000000000111111
11110110000000000000000000000000000000000111111111110000000011111
11111110000000000000000000000000000000001111111111111100000001111
11111110000010000000000000000001100000000111011111111110000001111
11111111000111110000000000000111110000000000111111111110110000111
11111110001111111100010000000001111100000111111111111111110000111
11111110001111111111111110000000111111100000000111111111111000111
11111111001111111111111111111000000111111111111111111111111100011
11111111101111111111111111111110000111111111111111111111111001111
11111111111111111111111111111110001111111111111111111111100111111
11111111111111111111111111111111001111111111111111111111001111111
11111111111111111111111111111111100111111111111111111111111111111
11111111111111111111111111111111110111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111111111111

*/




























































function timeFrame(beginTime, endTime) {
    var stime=Date.parse(beginTime.replace(/-/g,"/"));
	var etime=Date.parse(endTime.replace(/-/g,"/"));
	var now=new Date();
    if (now > stime && now < etime) {
        return true;
    } else {
        return false;
    }
}
var ntcheck = timeFrame(noticeStime,noticeEtime);
if(noRmenu==1 && (!passLevel || passLevel && currentLevel > passLevel)){
	document.oncontextmenu = function(){
		nomsg();
		event.returnValue = false; 
	}
	document.oncontextmenu=function(e){
		nomsg();
		return false;
	}
}
if(noSelect==1 && (!passLevel || passLevel && currentLevel > passLevel)){
	document.onselectstart=function(){
		nomsg();
		return false;
	}
}
document.addEventListener("keydown", function(e){
    var e = event || window.event || arguments.callee.caller.arguments[0],
    	k = e.keyCode || e.which || e.charCode;
	if (((k == 116 && noF5 == "1")||(e.ctrlKey && k == 82 && noF5 == "1")||(k == 123 && noF12 == "1")||(e.ctrlKey && e.shiftKey && k == 73 && noF12b == "1")||(e.ctrlKey && k == 67 && noCopy == "1")||(e.ctrlKey && k == 85 && noCtrlu == "1")) && (!passLevel || passLevel && currentLevel > passLevel)){
		nomsg();
		e.preventDefault();
		e.returnValue = false; //other
		e.cancelBubble = true; //ie
        return false;
    }
});
if(closeMsg!=""){
	window.onbeforeunload = function() { 
		return closeMsg; 
	}
}
if(jsctrl_copyTips!=""){
    document.addEventListener('copy', function (event) {
        if (typeof window.getSelection == "undefined") return;
        var body_element = document.getElementsByTagName('body')[0];
        var selection = window.getSelection();
        if (("" + selection).length < 10) return;
        var newdiv = document.createElement('div');
        newdiv.style.position = 'absolute';
        newdiv.style.left = '-99999px';
        body_element.appendChild(newdiv);
        newdiv.appendChild(selection.getRangeAt(0).cloneContents());
        if (selection.getRangeAt(0).commonAncestorContainer.nodeName == "PRE") {
            newdiv.innerHTML = "<pre>" + newdiv.innerHTML + "</pre>";
        }
        newdiv.innerHTML += "<br><br>--------------------<br>"+jsctrl_copyTips+"<br>原文地址："+ document.location.href;
        selection.selectAllChildren(newdiv);
        window.setTimeout(function () { body_element.removeChild(newdiv); }, 200);
    });
}
if(noIframe==1){
	(function(window) {
		if (window.location !== window.top.location) {
			window.top.location = window.location;
		}
	})(this);
}
function nomsg(){
	if(!$(".xytipshow").length && tipShow==1){
		tipText=="" ? tipText="抱歉，功能暂被禁用！" : '';
		$("body").append('<div class="xytipshow"><span>'+tipText+'</span></div>');
	}
	if(tipShow==1){
		$(".xytipshow").fadeIn().css({bottom:"20%"});
		setTimeout(function(){
			$(".xytipshow").css({bottom:"100%",opacity:"0"});
		},1500);
		setTimeout(function(){
			$(".xytipshow").remove();
		},2500);
	}
}
$(function(){
	if(closeSite==1){
		$("body").html("<div style=\"position:fixed;top:0;left:0;width:100%;height:100%;text-align:center;background:#fff;padding-top:150px;z-index:99999;\">"+closeTips+"</div>");
		jc_setCookie("jsctrl",0);
		$("body").removeClass("jsctrl-blur");
	}
	if(noSaveimg==1 && (!passLevel || passLevel && currentLevel > passLevel)){
		$("img,.disimg").bind("contextmenu", function(e){return false;});
		function jc_imgnomove(){
			return false;
		}
		function jc_imgnomoveAll(){
			for(i in document.images)document.images[i].ondragstart=jc_imgnomove;
		}
		$("img").bind("click",jc_imgnomoveAll());
	}
	if(noDisimg==1){
		$("img").each(function(){
			var pwh=$(this).width(),
				pht=$(this).height(),
				purl=$(this).attr("src");
			$(this).replaceWith('<div class="disimg" style="width:'+pwh+'px;height:'+pht+'px;background:url('+purl+') no-repeat;background-size:100%;"></div>');
	    });
	}
	if(newOpen==1){
		$("a").each(function(){
			if(typeof($(this).attr("target")) == "undefined"){
				$(this).attr({target:"_blank", jsctrlo:"1"});
			}
		});
		$("[class*='nav'],[id*='nav'],[class*='menu'],[id*='menu'],[class*='pagination'],[id*='pagination'],[class*='pagebar'],[id*='pagebar'],[class*='pager'],[class*='pages']").each(function(){
			if(typeof($(this).attr("href")) != "undefined" && $(this).attr("jsctrlo")){
				$(this).removeAttr("target");
			}
			$(this).find("a[jsctrlo='1']").removeAttr("target");
		});
	}
	if(noticeSet==1){
		var jsctrl = jc_getCookie("jsctrl");
		$("body").prepend($(".jsctrl-notice-wrap").prop("outerHTML"));
		$(".jsctrl-notice-wrap").css({maxHeight:$(window).height()});
		$(".jsctrl-notice-wrap:last").remove();
		$(".jsctrl-notice-box .xyclose").click(function(){
			$(".jsctrl-notice-wrap").parent().removeClass("jsctrl-blur");
			$(".jsctrl-notice-mini").delay(500).fadeIn(600).animate({opacity:"0"},300).animate({opacity:"1"},300).animate({opacity:"0"},300).animate({opacity:"1"},300);
			$(".jsctrl-notice-box").addClass("minishow");
			setTimeout(function(){
				$(".jsctrl-notice-wrap").removeClass("erxact");
			}, 300);
			jc_setCookie("jsctrl",1);
		});
		$(".jsctrl-notice-mini").click(function(){
			$(this).hide();
			$(".jsctrl-notice-wrap").parent().addClass("jsctrl-blur");
			$(".jsctrl-notice-wrap").addClass("erxact");
			$(".jsctrl-notice-box").removeClass("minishow");
			jc_setCookie("jsctrl",2);
		});
		if (ntcheck && (jsctrl == null || jsctrl == 2)) {
			setTimeout(function(){
				$(".jsctrl-notice-wrap").parent().addClass("jsctrl-blur");
			},200);
			$(".jsctrl-notice-mini").hide();
			$(".jsctrl-notice-wrap").addClass("erxact");
			$(".jsctrl-notice-box").show();
			$(".jsctrl-notice-box").removeClass("minishow");
		}else if(ntcheck && jsctrl == "1"){
			$(".jsctrl-notice-wrap").parent().removeClass("jsctrl-blur");
			$(".jsctrl-notice-mini").show();
			$(".jsctrl-notice-box").addClass("minishow");
			$(".jsctrl-notice-wrap").removeClass("erxact");
		}else{
			$(".jsctrl-notice-wrap").parent().removeClass("jsctrl-blur");
			$(".jsctrl-notice-mini, .jsctrl-notice-wrap").hide();
		}
	}
	if(devTools != '0' && (!passLevel || passLevel && currentLevel > passLevel)){
		$.getScript(bloghost+'zb_users/plugin/Jsctrl_vip/js/console-ban.min.js', function(){
			let nof12tip = '<div style="\x63\x6f\x6c\x6f\x72\x3a\x23\x66\x33\x33\x3b\x74\x65\x78\x74\x2d\x61\x6c\x69\x67\x6e\x3a\x63\x65\x6e\x74\x65\x72\x3b\x66\x6f\x6e\x74\x2d\x73\x69\x7a\x65\x3a\x31\x32\x70\x78\x3b\x74\x65\x78\x74\x2d\x73\x68\x61\x64\x6f\x77\x3a\x31\x70\x78\x20\x31\x70\x78\x20\x30\x20\x23\x66\x66\x66\x2c\x20\x2d\x31\x70\x78\x20\x2d\x31\x70\x78\x20\x30\x20\x23\x66\x66\x66\x3b\x70\x61\x64\x64\x69\x6e\x67\x3a\x32\x30\x76\x68\x20\x30\x3b" onclick="javascript:location.reload();">\u4e0d\u652f\u6301\u8c03\u8bd5\uff0c\u8bf7\u5173\u95ed\u5f00\u53d1\u8005\u5de5\u5177\u540e\u5237\u65b0\u7f51\u9875\</div>';
			if(devTools == 1){
				ConsoleBan.init({
					debugTime: 1500,
					callback: () => {
						window.close();
					}
				});
			}else{
				ConsoleBan.init({
					debugTime: 1500,
					write: nof12tip
				});
			}
		});
	}
});
function jc_setCookie(name, value) {
	var exp = new Date();
	exp.setTime(exp.getTime() + 1 * 24 * 60 * 60 * 1000);
	document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString()+";path=/";
}
function jc_getCookie(name) {
	var arr,
	reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
	if (arr = document.cookie.match(reg)) return (arr[2]);
	else return null;
}


































//若无十足把握，切勿修改以上代码，容易出错 作者QQ：77940140 https://app.zblogcn.com/?auth=3ec7ee20-80f2-498a-a5dd-fda19b198194
