PageSourceSearch

https://www.017207.com/wp-content/themes/begin/js/superfish.js?ver=2023/12/28

js 017207.com collected 2026-10-09 04:32:15 UTC 27,179 bytes, 428 lines download raw bytes

1/*Superfish*/
2(function($){var methods=function(){var c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",menuArrowClass:"sf-arrows"},ios=function(){var ios=/iPhone|iPad|iPod/i.test(navigator.userAgent);if (ios) $(window).on('load',function(){$("body").children().on("click",$.noop)});return ios}(),wp7=function(){var style=document.documentElement.style;return"behavior"in style&&("fill"in style&&/iemobile/i.test(navigator.userAgent))}(),toggleMenuClasses=function($menu,o){var classes=c.menuClass;
3if(o.cssArrows)classes+=" "+c.menuArrowClass;$menu.toggleClass(classes)},setPathToCurrent=function($menu,o){return $menu.find("li."+o.pathClass).slice(0,o.pathLevels).addClass(o.hoverClass+" "+c.bcClass).filter(function(){return $(this).children(o.popUpSelector).hide().show().length}).removeClass(o.pathClass)},toggleAnchorClass=function($li){$li.children("a").toggleClass(c.anchorClass)},toggleTouchAction=function($menu){var touchAction=$menu.css("ms-touch-action");touchAction=touchAction==="pan-y"?
4"auto":"pan-y";$menu.css("ms-touch-action",touchAction)},applyHandlers=function($menu,o){var targets="li:has("+o.popUpSelector+")";if($.fn.hoverIntent&&!o.disableHI)$menu.hoverIntent(over,out,targets);else $menu.on("mouseenter.superfish",targets,over).on("mouseleave.superfish",targets,out);var touchevent="MSPointerDown.superfish";if(!ios)touchevent+=" touchend.superfish";if(wp7)touchevent+=" mousedown.superfish";$menu.on("focusin.superfish","li",over).on("focusout.superfish","li",out).on(touchevent,
5"a",o,touchHandler)},touchHandler=function(e){var $this=$(this),$ul=$this.siblings(e.data.popUpSelector);if($ul.length>0&&$ul.is(":hidden")){$this.one("click.superfish",false);if(e.type==="MSPointerDown")$this.trigger("focus");else $.proxy(over,$this.parent("li"))()}},over=function(){var $this=$(this),o=getOptions($this);clearTimeout(o.sfTimer);$this.siblings().superfish("hide").end().superfish("show")},out=function(){var $this=$(this),o=getOptions($this);if(ios)$.proxy(close,$this,o)();else{clearTimeout(o.sfTimer);
6o.sfTimer=setTimeout($.proxy(close,$this,o),o.delay)}},close=function(o){o.retainPath=$.inArray(this[0],o.$path)>-1;this.superfish("hide");if(!this.parents("."+o.hoverClass).length){o.onIdle.call(getMenu(this));if(o.$path.length)$.proxy(over,o.$path)()}},getMenu=function($el){return $el.closest("."+c.menuClass)},getOptions=function($el){return getMenu($el).data("sf-options")};return{hide:function(instant){if(this.length){var $this=this,o=getOptions($this);if(!o)return this;var not=o.retainPath===
7true?o.$path:"",$ul=$this.find("li."+o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector),speed=o.speedOut;if(instant){$ul.show();speed=0}o.retainPath=false;o.onBeforeHide.call($ul);$ul.stop(true,true).animate(o.animationOut,speed,function(){var $this=$(this);o.onHide.call($this)})}return this},show:function(){var o=getOptions(this);if(!o)return this;var $this=this.addClass(o.hoverClass),$ul=$this.children(o.popUpSelector);o.onBeforeShow.call($ul);$ul.stop(true,true).animate(o.animation,
8o.speed,function(){o.onShow.call($ul)});return this},destroy:function(){return this.each(function(){var $this=$(this),o=$this.data("sf-options"),$hasPopUp;if(!o)return false;$hasPopUp=$this.find(o.popUpSelector).parent("li");clearTimeout(o.sfTimer);toggleMenuClasses($this,o);toggleAnchorClass($hasPopUp);toggleTouchAction($this);$this.off(".superfish").off(".hoverIntent");$hasPopUp.children(o.popUpSelector).attr("style",function(i,style){return style.replace(/display[^;]+;?/g,"")});o.$path.removeClass(o.hoverClass+
9" "+c.bcClass).addClass(o.pathClass);$this.find("."+o.hoverClass).removeClass(o.hoverClass);o.onDestroy.call($this);$this.removeData("sf-options")})},init:function(op){return this.each(function(){var $this=$(this);if($this.data("sf-options"))return false;var o=$.extend({},$.fn.superfish.defaults,op),$hasPopUp=$this.find(o.popUpSelector).parent("li");o.$path=setPathToCurrent($this,o);$this.data("sf-options",o);toggleMenuClasses($this,o);toggleAnchorClass($hasPopUp);toggleTouchAction($this);applyHandlers($this,
10o);$hasPopUp.not("."+c.bcClass).superfish("hide",true);o.onInit.call(this)})}}}();$.fn.superfish=function(method,args){if(methods[method])return methods[method].apply(this,Array.prototype.slice.call(arguments,1
10));else if(typeof method==="object"||!method)return methods.init.apply(this,arguments);else return $.error("Method "+method+" does not exist on jQuery.fn.superfish")};$.fn.superfish.defaults={popUpSelector:"ul,.sf-mega",hoverClass:"sfHover",pathClass:"overrideThisToUse",pathLevels:1,delay:800,
11animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:"normal",speedOut:"fast",cssArrows:true,disableHI:false,onInit:$.noop,onBeforeShow:$.noop,onShow:$.noop,onBeforeHide:$.noop,onHide:$.noop,onIdle:$.noop,onDestroy:$.noop};$.fn.extend({hideSuperfishUl:methods.hide,showSuperfishUl:methods.show})})(jQuery);
12
13/* Sidr */
14(function(e){var t=false,n=false;var r={isUrl:function(e){var t=new RegExp("^(https?:\\/\\/)?"+"((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|"+"((\\d{1,3}\\.){3}\\d{1,3}))"+"(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*"+"(\\?[;&a-z\\d%_.~+=-]*)?"+"(\\#[-a-z\\d_]*)?$","i");if(!t.test(e)){return false}else{return true}},loadContent:function(e,t){e.html(t)},addPrefix:function(e){var t=e.attr("id"),n=e.attr("id");if(typeof t==="string"&&""!==t){e.attr("id",t.replace(/([A-Za-z0-9_.\-]+)/g,"sidr-id-$1"))}if(typeof n==="string"&&""!==n&&"sidr-inner"!==n){}e.removeAttr("style")},execute:function(r,s,o){if(typeof s==="function"){o=s;s="sidr"}else{if(!s){s="sidr"}}var u=e("#"+s),a=e(u.data("body")),f=e("html"),l=u.outerWidth(true),c=u.data("speed"),h=u.data("side"),p=u.data("displace"),d=u.data("onOpen"),v=u.data("onClose"),m,g,y,b=s==="sidr"?"sidr-open":"sidr-open "+s+"-open";if("open"===r||"toggle"===r&&!u.is(":visible")){if(u.is(":visible")||t){return}if(n!==false){i.close(n,function(){i.open(s)});return}t=true;if(h==="left"){m={left:l+"px"};g={left:"0px"}}else{m={right:l+"px"};g={right:"0px"}}if(a.is("body")){y=f.scrollTop();f.css("overflow-x","hidden").scrollTop(y);a.addClass("sidr-show")}if(p){a.addClass("sidr-animating").css({width:a.width(),position:"absolute"}).animate(m,c,function(){e(this).addClass(b)})}else{setTimeout(function(){e(this).addClass(b)},c)}u.css("display","block").animate(g,c,function(){t=false;n=s;if(typeof o==="function"){o(s)}a.removeClass("sidr-animating")});d()}else{if(!u.is(":visible")||t){return}t=true;if(h==="left"){m={left:0};g={left:"-"+l+"px"}}else{m={right:0};g={right:"-"+l+"px"}}if(a.is("body")){y=f.scrollTop();f.removeAttr("style").scrollTop(y)}a.addClass("sidr-animating").animate(m,c).removeClass(b);u.animate(g,c,function(){u.removeAttr("style").hide();a.removeAttr("style");e("html").removeAttr("style");t=false;n=false;if(typeof o==="function"){o(s)}a.removeClass("sidr-animating");a.removeClass("sidr-show")});v()}}};var i={open:function(e,t){r.execute("open",e,t)},close:function(e,t){r.execute("close",e,t)},toggle:function(e,t){r.execute("toggle",e,t)},toogle:function(e,t){r.execute("toggle",e,t)}};e.sidr=function(t){if(i[t]){return i[t].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof t==="function"||typeof t==="string"||!t){return i.toggle.apply(this,arguments)}else{e.error("Method "+t+" does not exist on jQuery.sidr")}}};e.fn.sidr=function(t){var n=e.extend({name:"sidr",speed:200,side:"left",source:null,renaming:true,body:"body",displace:true,onOpen:function(){},onClose:function(){}},t);var s=n.name,o=e("#"+s);if(o.length===0){o=e("<div />").attr("id",s).appendTo(e("body"))}o.addClass("sidr").addClass(n.side).data({speed:n.speed,side:n.side,body:n.body,displace:n.displace,onOpen:n.onOpen,onClose:n.onClose});if(typeof n.source==="function"){var u=n.source(s);r.loadContent(o,u)}else{if(typeof n.source==="string"&&r.isUrl(n.source)){e.get(n.source,function(e){r.loadContent(o,e)})}else{if(typeof n.source==="string"){var a="",f=n.source.split(",");e.each(f,function(t,n){a+='<div class="sidr-inner">'+e(n).html()+"</div>"});if(n.renaming){var l=e("<div />").html(a);l.find("*").each(function(t,n){var i=e(n);r.addPrefix(i)});a=l.html()}r.loadContent(o,a)}else{if(n.source!==null){e.error("Invalid Sidr Source")}}}}return this.each(function(){var t=e(this),n=t.data("sidr");if(!n){t.data("sidr",s);if("ontouchstart" in document.documentElement){t.bind("touchstart",function(e){var t=e.originalEvent.touches[0];this.touched=e.timeStamp});t.bind("touchend",function(e){var t=Math.abs(e.timeStamp-this.touched);if(t<200){e.preventDefault();i.toggle(s)}})}else{t.click(function(e){e.preventDefault();i.toggle(s)})}}})}})(jQuery);
15
16jQuery(document).ready(function($) {
17	// Main menu superfish
18	$('ul.nav-menu, .top-menu').superfish({
19		delay: 200,
20		hoverClass: 'behover',
21		animation: {
22			opacity: 'show',
23			height: 'show'
24		},
25		speed: 'normal'
26	});
27
28	// Mobile Menu
29	$('#navigation-toggle').sidr({
30		name: 'sidr-main',
31		source: '#sidr-close, #site-nav, .sidr-login',
32		side: 'left',
33		displace: false,
34		onOpen: function onOpen() {
35			$('.menu-but').toggleClass("menu-open");
36			$(".usericon img").lazyload({
37				effect: "fadeIn",
38				threshold: 500,
39			});
40		},
41
42		onClose: function onClose() {
43			$('.menu-but').toggleClass("menu-open");
44		}
45	});
46
47	$("body").click(function(e) {
48		var target = $(e.target);
49		if (!target.closest("#sidr-main").length) {
50			$.sidr('close', 'sidr-main');
51		}
52	});
53
54	$(window).resize(function() {
55		$.sidr('close', 'sidr-main');
56	});
57
58	$(".menu-mobile-but, .off-mobile-nav").click(function() {
59		$(".menu-but").toggleClass("menu-open");
60	});
61
62});
63
64// jquery.wookmark 1.4.5
65(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function i(t){n(function(){var i,e;for(i in t)e=t[i],e.obj.css(e.css)})}function e(i){return t.trim(i).toLowerCase()}var s,h,o;o=function(t,i){return function(){return t.apply(i,arguments)}},h={align:"center",autoResize:!1,comparator:null,container:t("body"),ignoreInactiveItems:!0,itemWidth:0,fillEmptySp
65ace:!1,flexibleWidth:0,direction:void 0,offset:2,onLayoutChanged:void 0,outerOffset:0,resizeDelay:50,possibleFilters:[]};var n=window.requestAnimationFrame||function(t){t()};s=function(){function s(i,e){this.handler=i,this.columns=this.containerWidth=this.resizeTimer=null,this.activeItemCount=0,this.itemHeightsDirty=!0,this.placeholders=[],t.extend(!0,this,h,e),this.update=o(this.update,this),this.onResize=o(this.onResize,this),this.onRefresh=o(this.onRefresh,this),this.getItemWidth=o(this.getItemWidth,this),this.layout=o(this.layout,this),this.layoutFull=o(this.layoutFull,this),this.layoutColumns=o(this.layoutColumns,this),this.filter=o(this.filter,this),this.clear=o(this.clear,this),this.getActiveItems=o(this.getActiveItems,this),this.refreshPlaceholders=o(this.refreshPlaceholders,this),this.sortElements=o(this.sortElements,this),this.updateFilterClasses=o(this.updateFilterClasses,this),this.updateFilterClasses(),this.autoResize&&t(window).bind("resize.wookmark",this.onResize),this.container.bind("refreshWookmark",this.onRefresh)}return s.prototype.updateFilterClasses=function(){for(var t,i,s,h,o=0,n=0,r=0,a={},l=this.possibleFilters;this.handler.length>o;o++)if(i=this.handler.eq(o),t=i.data("filterClass"),"object"==typeof t&&t.length>0)for(n=0;t.length>n;n++)s=e(t[n]),a[s]||(a[s]=[]),a[s].push(i[0]);for(;l.length>r;r++)h=e(l[r]),h in a||(a[h]=[]);this.filterClasses=a},s.prototype.update=function(i){this.itemHeightsDirty=!0,t.extend(!0,this,i)},s.prototype.onResize=function(){clearTimeout(this.resizeTimer),this.itemHeightsDirty=0!==this.flexibleWidth,this.resizeTimer=setTimeout(this.layout,this.resizeDelay)},s.prototype.onRefresh=function(){this.itemHeightsDirty=!0,this.layout()},s.prototype.filter=function(i,s){var h,o,n,r,a,l=[],f=t();if(i=i||[],s=s||"or",i.length){for(o=0;i.length>o;o++)a=e(i[o]),a in this.filterClasses&&l.push(this.filterClasses[a]);if(h=l.length,"or"==s||1==h)for(o=0;h>o;o++)f=f.add(l[o]);else if("and"==s){var u,c,d,m=l[0],p=!0;for(o=1;h>o;o++)l[o].length<m.length&&(m=l[o]);for(m=m||[],o=0;m.length>o;o++){for(c=m[o],p=!0,n=0;l.length>n&&p;n++)if(d=l[n],m!=d){for(r=0,u=!1;d.length>r&&!u;r++)u=d[r]==c;p&=u}p&&f.push(m[o])}}this.handler.not(f).addClass("inactive")}else f=this.handler;f.removeClass("inactive"),this.columns=null,this.layout()},s.prototype.refreshPlaceholders=function(i,e){for(var s,h,o,n,r,a,l=this.placeholders.length,f=this.columns.length,u=this.container.innerHeight();f>l;l++)s=t('<div class="wookmark-placeholder"/>').appendTo(this.container),this.placeholders.push(s);for(a=this.offset+2*parseInt(this.placeholders[0].css("borderLeftWidth"),10),l=0;this.placeholders.length>l;l++)if(s=this.placeholders[l],o=this.columns[l],l>=f||!o[o.length-1])s.css("display","none");else{if(h=o[o.length-1],!h)continue;r=h.data("wookmark-top")+h.data("wookmark-height")+this.offset,n=u-r-a,s.css({position:"absolute",display:n>0?"block":"none",left:l*i+e,top:r,width:i-a,height:n})}},s.prototype.getActiveItems=function(){return this.ignoreInactiveItems?this.handler.not(".inactive"):this.handler},s.prototype.getItemWidth=function(){var t=this.itemWidth,i=this.container.width()-2*this.outerOffset,e=this.handler.eq(0),s=this.flexibleWidth;if(void 0===this.itemWidth||0===this.itemWidth&&!this.flexibleWidth?t=e.outerWidth():"string"==typeof this.itemWidth&&this.itemWidth.indexOf("%")>=0&&(t=parseFloat(this.itemWidth)/100*i),s){"string"==typeof s&&s.indexOf("%")>=0&&(s=parseFloat(s)/100*i);var h=~~(.5+(i+this.offset)/(s+this.offset)),o=Math.min(s,~~((i-(h-1)*this.offset)/h));t=Math.max(t,o),this.handler.css("width",t)}return t},s.prototype.layout=function(t){if(this.container.is(":visible")){var i,e=this.getItemWidth()+this.offset,s=this.container.width(),h=s-2*this.outerOffset,o=~~((h+this.offset)/e),n=0,r=0,a=0,l=this.getActiveItems(),f=l.length;if(this.itemHeightsDirty||!this.container.data("itemHeightsInitialized")){for(;f>a;a++)i=l.eq(a),i.data("wookmark-height",i.outerHeight());this.itemHeightsDirty=!1,this.container.data("itemHeightsInitialized",!0)}o=Math.max(1,Math.min(o,f)),n=this.outerOffset,"center"==this.align&&(n+=~~(.5+(h-(o*e-this.offset))>>1)),this.direction=this.direction||("right"==this.align?"right":"left"),r=t||null===this.columns||this.columns.length!=o||this.activeItem
65Count!=f?this.layoutFull(e,o,n):this.layoutColumns(e,n),this.activeItemCount=f,this.container.css("height",r),this.fillEmptySpace&&this.refreshPlaceholders(e,n),void 0!==this.onLayoutChanged&&"function"==typeof this.onLayoutChanged&&this.onLayoutChanged()}},s.prototype.sortElements=function(t){return"function"==typeof this.comparator?t.sort(this.comparator):t},s.prototype.layoutFull=function(e,s,h){var o,n,r=0,a=0,l=t.makeArray(this.getActiveItems()),f=l.length,u=null,c=null,d=[],m=[],p="left"==this.align?!0:!1;for(this.columns=[],l=this.sortElements(l);s>d.length;)d.push(this.outerOffset),this.columns.push([]);for(;f>r;r++){for(o=t(l[r]),u=d[0],c=0,a=0;s>a;a++)u>d[a]&&(u=d[a],c=a);o.data("wookmark-top",u),n=h,(c>0||!p)&&(n+=c*e),(m[r]={obj:o,css:{position:"absolute",top:u}}).css[this.direction]=n,d[c]+=o.data("wookmark-height")+this.offset,this.columns[c].push(o)}return i(m),Math.max.apply(Math,d)},s.prototype.layoutColumns=function(t,e){for(var s,h,o,n,r=[],a=[],l=0,f=0,u=0;this.columns.length>l;l++){for(r.push(this.outerOffset),h=this.columns[l],n=l*t+e,s=r[l],f=0;h.length>f;f++,u++)o=h[f].data("wookmark-top",s),(a[u]={obj:o,css:{top:s}}).css[this.direction]=n,s+=o.data("wookmark-height")+this.offset;r[l]=s}return i(a),Math.max.apply(Math,r)},s.prototype.clear=function(){clearTimeout(this.resizeTimer),t(window).unbind("resize.wookmark",this.onResize),this.container.unbind("refreshWookmark",this.onRefresh),this.handler.wookmarkInstance=null},s}(),t.fn.wookmark=function(t){return this.wookmarkInstance?this.wookmarkInstance.update(t||{}):this.wookmarkInstance=new s(this,t||{}),this.wookmarkInstance.layout(!0),this.show()}});
66
67jQuery(document).ready(function($){
68	var fall_width = fallwidth.fall_width;
69	$('.fall').wookmark({
70		itemWidth: 90,
71		autoResize: true,
72		container: $('.post-fall'),
73		offset: 10,
74		outerOffset: 0,
75		flexibleWidth: fall_width
76	});
77
78	$('.fall').removeClass('fall-off');
79	$('.fall').addClass('fall-on');
80})
81
82// toc
83jQuery(document).ready(function($){
84	var flag = true
85	$(window).scroll(function(){
86		if(flag){
87			var winH = $(window).innerHeight()/200;
88			var scrollT = $(window).scrollTop()
89			var len = $(".toch").length
90			var lon = $(".toc-box-h").length
91			for(var i=0;i<len;i++){
92				var bannerGap = $(".toch")[i].offsetTop - scrollT
93				if(bannerGap < winH){
94					$(".toc-level").eq(i).addClass("active").siblings().removeClass("active")
95				}
96			}
97			for(var i=0;i<lon;i++){
98				var bannerGap = $(".toc-box-h")[i].offsetTop - scrollT
99				if(bannerGap < winH){
100					$(".toc-ul-box li").eq(i).addClass("active").siblings().removeClass("active")
101				}
102			}
103		}
104	});
105
106	if ( $(".toc-level-2").length ) {
107	} else {
108		$(".toc-level-3,.toc-level-4,.toc-level-5,.toc-level-6").addClass("noh2")
109	}
110
111	if ( $(".toc-level-3").length ) {
112	} else {
113		$(".toc-level-4,.toc-level-5,.toc-level-6").addClass("noh3")
114	}
115
116	$(".toc-widget").click(function(){
117		$(".widget-area .widget").toggleClass("tocshow");
118		$(".widget-area .widget").addClass("tochide");
119	});
120
121	$(".toc-widget").click(function(){
122		$(".be-toc-widget").removeClass("tochide");
123	});
124
125	if ($(".toc-main").length > 0) {
126		$(".be-beshare-toc").removeClass("tocno");
127	}
128
129	$(".toc-widget").mouseover(function(){
130		$(".toc-prompt").fadeOut();
131	});
132});
133
134// 数字动画
135jQuery(document).ready(function($) {
136	let visibilityIds = ['.be_count_1', '.be_count_2', '.be_count_3', '.be_count_4', '.be_count_5', '.be_count_6', '.be_count_7', '#be_counter-1', '#be_counter-2', '#be_counter-3', '#be_counter-4', '#be_counter-5', '#be_counter-6', '#be_counter-7', '#be_counter-8', '#be_counter-9', '#be_counter-10', '#be_counter-11', '#be_counter-12', '#be_counter-13', '#be_counter-14', '#be_counter-15', '#be_counter-16', '#be_counter-17', '#be_counter-18', '#be_counter-19', '#be_counter-20', '.group_count_1'];
137	let counterClass = '.counter';
138	let defaultSpeed = 10000;
139
140	$(window).on('scroll',
141	function() {
142		getVisibilityStatus();
143	});
144
145	getVisibilityStatus();
146
147	function getVisibilityStatus() {
148		elValFromTop = [];
149		var windowHeight = $(window).height(),
150		windowScrollValFromTop = $(this).scrollTop();
151
152		visibilityIds.forEach(function(item, index) {
153			try {
154				elValFromTop[index] = Math.ceil($(item).offset().top);
155			} catch(err) {
156				return;
157			}
158			if ((windowHeight + windowScrollValFromTop) > elValFromTop[index]) {
159				counter_init(item);
160			}
161		});
162	}
163
164	function counter_init(groupId) {
165		let num,
166		speed,
167		direction,
168		index = 0;
169		$(counterClass).each(function() {
170			num = $(this).attr('data-TargetNum');
171			speed = $(this).attr('data-Speed');
172			direction = $(this).attr('data-Direction');
173			easing = $(this).attr('data-Easing');
174			if (speed == undefined) speed = defaultSpeed;
175			$(this).addClass('c_' + index);
176			doCount(num, index, speed, groupId, direction, easing);
177			index++;
178		});
179	}
180
181	function doCount(num, index, speed, groupClass, direction, easing) {
182		let className = groupClass + ' ' + counterClass + '.' + 'c_' + index;
183		if (easing == undefined) easing = "swing";
184		$(className).animate({
185			num
186		},
187		{
188			duration: +speed,
189			easing: easing,
190			step: function(now) {
191				if (direction == 'reverse') {
192					$(this).text(num - Math.floor(now));
193				} else {
194					$(this).text(Math.floor(now));
195				}
196			},
197			complete: doCount
198		});
199	}
200});
201
202// 复制文本
203jQuery(document).ready(function($){
204	$('.textbox').prepend('<span class="btn-copy be-btn-copy"></span>').children('.btn-copy');
205	var copyText = new ClipboardJS('.btn-copy', {
206		target: function(trigger) {
207			return trigger.nextElementSibling;
208		}
209	});
210
211	copyText.on('success',
212	function(event) {
213		event.clearSelection();
214		event.trigger.innerHTML = '<span class="fd">复制成功</span><div class="copy-success fd"><div class="copy-success-text">复制成功,联系我们</div></div>';
215		$('.copy-success').closest('.textbox').addClass('copy-show');
216		window.setTimeout(function() {
217			event.trigger.innerHTML = '<span class="fd">点击复制</span>';
218			$('.textbox').removeClass('copy-show');
219		},
220		3000);
221	});
222
223	// 复制微信
224	var copyText = new ClipboardJS('.btn-weixin-copy', {
225		target: function(trigger) {
226			return trigger.nextElementSibling;
227		}
228	});
229
230	copyText.on('success',
231	function(event) {
232		event.clearSelection();
233		event.trigger.innerHTML = '<div class="copy-success-weixin fd"><div class="copy-success-weixin-text"><span class="dashicons dashicons-saved"></span><span class="weixinid">微信号</span>已复制到剪贴板</div></div>';
234		$('.copy-success').closest('.weixinbox').addClass('copy-show');
235		window.setTimeout(function() {
236			event.trigger.innerHTML = '<div class="fd"><i class="be be-clipboard"></i></div>';
237			$('.weixinbox').removeClass('copy-show');
238		},
239		3000);
240	});
241
242	// 复制邀请码
243	var copyText = new ClipboardJS('.invite-copy', {
244		target: function(trigger) {
245			return trigger.nextElementSibling;
246		}
247	});
248
249	copyText.on('success',
250	function(event) {
251		event.clearSelection();
252		event.trigger.innerHTML = '<span class="copy-invite-success fd"><span class="dashicons dashicons-saved"></span></span>';
253		window.setTimeout(function() {
254			event.trigger.innerHTML = '<span class="copy-invite-success fd"><i class="be be-clipboard"></i></span>';
255		},
256		3000);
257	});
258
259	// 复制正文
260	$('.copy-content').click(function() {
261		var titleContent = $('.entry-title').text().trim();
262		var singleContent = $('.single-content').text().trim();
263		//var textContent = $('.single-content').html().replace(/<\/?p>/g, '\n').trim();
264		var textContent = titleContent + '\n' + singleContent;
265		copyToClipboard(textContent);
266
267		$('.copy-content-tip').addClass('success');
268		$('.be-main').addClass('success');
269
270		setTimeout(function() {
271			$('.copy-content-tip').removeClass('success');
272			$('.be-main').removeClass('success');
273		}, 1000);
274	});
275
276	// 正文到剪贴板
277	function copyToClipboard(content) {
278		var tempInput = document.createElement('textarea');
279
280		tempInput.style.opacity = 0;
281		tempInput.value = content;
282		document.body.appendChild(tempInput);
283		tempInput.select();
284		document.execCommand('copy');
285		document.body.removeChild(tempInput);
286	}
287
288	// 下载TAB
289	$(".tab-down-nav .tab-down-item").click(function() {
290		var tab_index = $(this).index();
291		lazy();
292		$(this).addClass("active").siblings().removeClass("active");
293		$(".tab-down-content .tab-content-item").eq(tab_index).addClass("show").siblings().removeClass("show");
294	});
295
296	$('.tab-down-item-url').click(function() {
297		$('html,body').animate({
298			scrollTop: $('.down-area').offset().top - 80
299		},
300		800);
301	});
302
303	// 直达下载模块
304	$('.tao-down-btn').click(function() {
305		$('html,body').animate({
306			scrollTop: $('.erphpdown').offset().top - 80
307		},
308		800);
309	});
310
311	// 文档模板
312	$('.note-nav-btn > a').on('click', function() {
313		$(this).parent('li').toggleClass('note-nav-hide');
314		if ($('.note-nav-btn').hasClass('note-current-show')) {
315			$(this).parent('li').removeClass('note-current-show');
316		}
317	});
318
319	// 文档小工具目录
320	$('.be-note-nav-widget .menu-item-has-children > a').on('click', function() {
321		$(this).next('.sub-menu').toggleClass('note-widget-show');
322		$('.be-note-nav').removeClass('note-nav-widget-show');
323	});
324
325	$('.be-note-nav-widget .menu-item .sub-menu .current-menu-item').parents('.sub-menu').addClass('note-widget-show');
326	$('.be-note-nav-widget.note-nav-widget-show .sub-menu').addClass('note-widget-show');
327
328	$(".be-note-nav-widget .menu-item-has-children > a").on("click", function(event) {
329		event.preventDefault();
330	});
331
332	$('.note-show-all').on('click', function() {
333		if ($('.note-nav-btn').hasClass('note-current-show')) {
334			$('.note-nav-btn').removeClass('note-current-show');
335		}
336
337		if ($('.note-nav-btn').hasClass('note-nav-hide')) {
338			$('.note-nav-btn').removeClass('note-nav-hide');
339		} else {
340			$('.note-nav-btn').addClass('note-nav-hide');
341		}
342
343		if ($('.be-note-nav-widget .sub-menu').hasClass('note-widget-show')) {
344			$('.be-note-nav-widget .sub-menu').removeClass('note-widget-show');
345		} else {
346			$('.be-note-nav-widget .sub-menu').addClass('note-widget-show');
347		}
348
349		$('.be-note-nav').removeClass('note-nav-widget-show');
350	});
351
352	$('.note-nav-switch').on('click', function() {
353		if ($('.be-note-nav-box').hasClass('note-nav-mini')) {
354			$('.be-note-nav-box').removeClass('note-nav-mini').removeClass('note-nav-max');
355		} else {
356			$('.be-note-nav-box').addClass('note-nav-mini').addClass('note-nav-max');
357		}
358	});
359	
360	// 清除浏览记录
361	$(".clear-cookie").click(function() {
362		document.cookie = "astx_recent_posts=; expires=Thu, 01 Jan 1970 00:00:00 UTC; domain=" + window.location.hostname + "; path=/";
363		alert("浏览记录已清除!");
364		location.reload();
365	});
366
367});
368
369// 加载历史版本
370var assetsid = assetsData.postID;
371var homeurl = homeData.homeurl;
372var isLoaded = false; // 是否已加载
373function fetchContent() {
374	if (isLoaded) {
375		return; // 如果已加载不执行请求
376	}
377
378	// 显示加载中动画
379	var loadingElement = document.querySelector('.ajax-loading');
380	loadingElement.style.display = 'block';
381
382	var xhr = new XMLHttpRequest();
383	xhr.onreadystatechange = function() {
384		if (xhr.readyState === XMLHttpRequest.DONE) {
385			// 隐藏加载中动画
386			loadingElement.style.display = 'none';
387
388			if (xhr.status === 200) {
389				var responseElement = document.createElement('div');
390				responseElement.innerHTML = xhr.responseText;
391				var contentToFetch = responseElement.querySelector('#erphpdown-download');
392				if (contentToFetch) {
393					document.getElementById('down-version').appendChild(contentToFetch);
394				}
395			} else {
396			// 显示错误提示信息
397				var errorElement = document.querySelector('.down-version-error');
398				errorElement.style.display = 'block';
399			}
400
401			isLoaded = true; //已加载
402		}
403	};
404	xhr.open('GET', '' + homeurl + '/wp-content/plugins/erphpdown/download.php?postid=' + assetsid, true);
405
406	xhr.send();
407}
408
409// 复制qq
410function copyToClipboard(element) {
411	const hrefValue = element.getAttribute('href');
412	const regex = /&uin=(\d+)&/;
413	const match = hrefValue.match(regex);
414	if (match && match[1]) {
415		const uinValue = match[1];
416
417		const tempTextArea = document.createElement('textarea');
418		tempTextArea.value = uinValue;
419		document.body.appendChild(tempTextArea);
420		tempTextArea.select();
421		document.execCommand('copy');
422		document.body.removeChild(tempTextArea);
423
424		alert('QQ号 ' + uinValue + ' 已复制,可粘贴到QQ中添加我为好友!');
425	} else {
426		alert('出问题了,请重新复制!');
427	}
428}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.