function getURLParameter(e){return decodeURIComponent((new RegExp("[?|&]"+e+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}function doprogress(){var e=20;if(cc!=e){var t=100*(cc+1)/e;$(".progress-bar").css("width",t+"%"),cc+=1,setTimeout(doprogress,8e3/e)}else $("body").removeClass("stop-scrolling"),$(".popboxbg").remove(),$(".popbox").remove()}function addsubscription(){var e=[{homepage:"http://www.adtchrome.com/extension/adt-chinalist-easylist.html",title:"广告终结者默认过滤规则",url:"http://sub.adtchrome.com/adt-chinalist-easylist.txt",disabled:!1}];e.forEach(function(e){var t=Subscription.fromURL(e.url);FilterStorage.addSubscription(t),t.disabled=e.disabled,t.title=e.title,t.homepage=e.homepage,t instanceof DownloadableSubscription&&!t.lastDownload&&Synchronizer.execute(t)}),Cscript.add("去视频广告脚本","http://sub.adtchrome.com/videoadjs.txt"),Cscript.add("HTML5播放","http://sub.adtchrome.com/html5player.txt")}function getBroswerType(){var e=navigator.userAgent.toLowerCase();if(e.indexOf("lbbrowser")>0)return"lbbrowser";var t="track"in document.createElement("track"),r="scoped"in document.createElement("style"),o="v8Locale"in window;return t&&r&&o?"360se":t&&r&&!o?"360ee":"chrome"}var backgroundPage=chrome.extension.getBackgroundPage(),require=backgroundPage.require,subscriptionClasses=require("subscriptionClasses"),Subscription=subscriptionClasses.Subscription,FilterNotifier=require("filterNotifier").FilterNotifier,FilterStorage=require("filterStorage").FilterStorage,DownloadableSubscription=subscriptionClasses.DownloadableSubscription,Synchronizer=require("synchronizer").Synchronizer,Cscript=require("cscript").Cscript,fdownnum=0,alldown=1,cc=0;doprogress(),function(e){e.fn.extend({center:function(t){var t=e.extend({inside:window,transition:0,minX:0,minY:0,withScrolling:!0,vertical:!0,horizontal:!0},t);return this.each(function(){var r={position:"absolute"};if(t.vertical){var o=(e(t.inside).height()-e(this).outerHeight())/2;t.withScrolling&&(o+=e(t.inside).scrollTop()||0),o=o>t.minY?o:t.minY,e.extend(r,{top:o+"px"})}if(t.horizontal){var i=(e(t.inside).width()-e(this).outerWidth())/2;t.withScrolling&&(i+=e(t.inside).scrollLeft()||0),i=i>t.minX?i:t.minX,e.extend(r,{left:i+"px"})}return t.transition>0?e(this).animate(r,t.transition):e(this).css(r),e(this)})}})}(jQuery),$(function(){$("body").addClass("stop-scrolling"),$(".popbox").center(),$(window).bind("resize",function(){$(".popbox").center({transition:300})}),addsubscription(),$(window).scroll(function(e){$(window).scrollTop()>69?$("#sideToolbar-up").fadeIn(100):$("#sideToolbar-up").fadeOut(100)}),$("#sideToolbar-up").click(function(e){$("body,html").animate({scrollTop:0},500)}),$("#"+getBroswerType()+"-warn").show(),null!=getURLParameter("test")&&($("body").removeClass("stop-scrolling"),$(".popboxbg").remove(),$(".popbox").remove())});var _gaq=_gaq||[];_gaq.push(["_setAccount","UA-48334954-1"]),_gaq.push(["_trackPageview"]),function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://ssl.google-analytics.com/ga.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}();