From cb0784331c56c649bbc4b20df690ada50ae72300 Mon Sep 17 00:00:00 2001 From: axetroy Date: Thu, 17 Nov 2016 17:33:59 +0800 Subject: [PATCH] =?UTF-8?q?feat(new):=20=E6=96=B0=E5=A2=9Eweibo/twitter?= =?UTF-8?q?=E7=9A=84=E5=8E=BB=E9=99=A4=E8=B7=B3=E8=BD=AC=EF=BC=8C=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E9=87=8D=E6=9E=84=E4=B8=80=E4=BA=9B=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/anti-redirect.min.user.js | 10 +- dist/anti-redirect.user.js | 721 ++++++++++++++++++++++----------- index.ts | 5 + src/baidu.ts | 50 ++- src/google.ts | 4 - src/redirect-on-request.ts | 19 +- src/redirect-on-url.ts | 46 ++- src/so.ts | 3 - src/twitter.ts | 29 ++ src/weibo.ts | 29 ++ src/zhihu-daily.ts | 3 - src/zhihu.ts | 3 - webpack.config.js | 2 + 13 files changed, 631 insertions(+), 293 deletions(-) create mode 100644 src/twitter.ts create mode 100644 src/weibo.ts diff --git a/dist/anti-redirect.min.user.js b/dist/anti-redirect.min.user.js index 7cdfadd..b99fe67 100644 --- a/dist/anti-redirect.min.user.js +++ b/dist/anti-redirect.min.user.js @@ -3,13 +3,15 @@ // @author axetroy // @collaborator axetroy // @description 反重定向 -// @version 2016.11.17.732 +// @version 2016.11.17.3159 // @grant GM_xmlhttpRequest // @include *www.baidu.com* // @include *www.google.* // @include *www.so.com* // @include *www.zhihu.com* // @include *daily.zhihu.com* +// @include *weibo.com* +// @include *twitter.com* // @connect * // @compatible chrome 完美运行 // @compatible firefox 完美运行 @@ -23,10 +25,10 @@ // Github源码:https://github.com/axetroy/anti-redirect -!function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,e,r){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=80)}([function(t,e,r){"use strict";var n=r(2),o=r(76),i=r(11),u=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,i=o.toSubscriber(t,e,r);if(n?n.call(i,this):i.add(this._subscribe(i)),i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype.forEach=function(t,e){var r=this;if(e||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?e=n.root.Rx.config.Promise:n.root.Promise&&(e=n.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,n){var o=r.subscribe(function(e){if(o)try{t(e)}catch(t){n(t),o.unsubscribe()}else t(e)},n,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[i.$$observable]=function(){return this},t.create=function(e){return new t(e)},t}();e.Observable=u},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(14),i=r(7),u=r(17),s=r(20),c=function(t){function e(r,n,o){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=u.empty;break;case 1:if(!r){this.destination=u.empty;break}if("object"==typeof r){r instanceof e?(this.destination=r,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new a(this,r));break}default:this.syncErrorThrowable=!0,this.destination=new a(this,r,n,o)}}return n(e,t),e.prototype[s.$$rxSubscriber]=function(){return this},e.create=function(t,r,n){var o=new e(t,r,n);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e}(i.Subscription);e.Subscriber=c;var a=function(t){function e(e,r,n,i){t.call(this),this._parent=e;var u,s=this;o.isFunction(r)?u=r:r&&(s=r,u=r.next,n=r.error,i=r.complete,o.isFunction(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this)),this._context=s,this._next=u,this._error=n,this._complete=i}return n(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parent;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parent;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){if(!this.isStopped){var t=this._parent;this._complete?t.syncErrorThrowable?(this.__tryOrSetError(t,this._complete),this.unsubscribe()):(this.__tryOrUnsub(this._complete),this.unsubscribe()):this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,r){try{e.call(this._context,r)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parent;this._context=null,this._parent=null,t.unsubscribe()},e}(c)},function(t,e,r){"use strict";(function(t){if(e.root="object"==typeof window&&window.window===window&&window||"object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t,!e.root)throw new Error("RxJS could not find any global context (window, self, global)")}).call(e,r(79))},function(t,e){"use strict";e.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(1),i=function(t){function e(){t.apply(this,arguments)}return n(e,t),e.prototype.notifyNext=function(t,e,r,n,o){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(o.Subscriber);e.OuterSubscriber=i},function(t,e,r){"use strict";function n(t,e,r,n){var f=new a.InnerSubscriber(t,r,n);if(f.closed)return null;if(e instanceof s.Observable)return e._isScalar?(f.next(e.value),f.complete(),null):e.subscribe(f);if(i.isArray(e)){for(var h=0,p=e.length;h1?new e(t,n):1===o?new i.ScalarObservable(t[0],n):new u.EmptyObservable(n)},e.dispatch=function(t){var e=t.array,r=t.index,n=t.count,o=t.subscriber;return r>=n?void o.complete():(o.next(e[r]),void(o.closed||(t.index=r+1,this.schedule(t))))},e.prototype._subscribe=function(t){var r=0,n=this.array,o=n.length,i=this.scheduler;if(i)return i.schedule(e.dispatch,0,{array:n,index:r,count:o,subscriber:t});for(var u=0;u=200&&e.status<400&&e.finalUrl?t.next(e):t.error(e),t.complete())},e.onerror=function(e){n.isFunction(i)&&i.call(this,e),t.error(e),t.complete()},e.onabort=function(e){n.isFunction(u)&&u.call(this,e),t.error(e),t.complete()},e.ontimeout=function(e){n.isFunction(s)&&s.call(this,e),t.error(e),t.complete()},GM_xmlhttpRequest(n.extend({},e))})},t.prototype.get=function(t,e){var r=n.extend(e||{},{url:t,method:"GET"});return this.request(r)},t.prototype.post=function(t,e,r){return this.request(n.extend(r||{},{url:t,method:"POST",data:e}))},t.prototype.head=function(t,e){return this.request(n.extend(e||{},{url:t,method:"HEAD"}))},t}(),u=2e3;e.timeout=u;var s=new i({timeout:u});e.http=s},function(t,e,r){"use strict";var n=r(0),o=r(54);n.Observable.forkJoin=o.forkJoin},function(t,e,r){"use strict";var n=r(0),o=r(55);n.Observable.from=o.from},function(t,e,r){"use strict";var n=r(0),o=r(56);n.Observable.fromEvent=o.fromEvent},function(t,e,r){"use strict";var n=r(0),o=r(57);n.Observable.of=o.of},function(t,e,r){"use strict";var n=r(0),o=r(58);n.Observable.timer=o.timer},function(t,e,r){"use strict";var n=r(0),o=r(59);n.Observable.prototype.debounce=o.debounce},function(t,e,r){"use strict";var n=r(0),o=r(60);n.Observable.prototype.delay=o.delay},function(t,e,r){"use strict";var n=r(0),o=r(61);n.Observable.prototype.do=o._do,n.Observable.prototype._do=o._do},function(t,e,r){"use strict";var n=r(0),o=r(62);n.Observable.prototype.filter=o.filter},function(t,e,r){"use strict";var n=r(0),o=r(63);n.Observable.prototype.map=o.map},function(t,e,r){"use strict";var n=r(0),o=r(64);n.Observable.prototype.mergeMap=o.mergeMap,n.Observable.prototype.flatMap=o.mergeMap},function(t,e,r){"use strict";var n=r(0),o=r(66);n.Observable.prototype.retry=o.retry},function(t,e,r){"use strict";var n=r(0),o=r(67);n.Observable.prototype.throttle=o.throttle},function(t,e,r){"use strict";var n=r(0),o=r(68);n.Observable.prototype.timeout=o.timeout},function(t,e,r){"use strict";function n(t){return t.innerText||t.textContent}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(0),u=r(24),s=r(77),c=function(t){function e(e,r,n,o){return void 0===o&&(o="a"),t.call(this,e,r,n,o)||this}return o(e,t),e.prototype.handlerAll=function(){var t=this,e=location.search.match(/pn=(\d+)/)||[""],r=2===e.length?+e[1]:0,n=window.top.location.href;if(/www\.baidu\.com\/s/.test(n)){var o=n.replace(/(\&)(tn=\w+)(\&)/gim,"$1tn=baidulocal$3")+("×tamp="+(new Date).getTime());o.indexOf("tn=baidulocal")===-1&&(o+="&tn=baidulocal"),i.Observable.forkJoin(u.http.get(o),u.http.get(o.replace(/pn=(\d+)/,"pn="+(r+10)))).retry(2).timeout(u.timeout).subscribe(function(e){e&&e.length&&e.forEach(function(e){return t.handlerAllOne(e)})})}},e.prototype.handlerAllOne=function(t){var e=this,r=t.responseText.replace(/(src=[^>]*|link=[^>])/g,""),o=document.createElement("html");o.innerHTML=r,i.Observable.of(o.querySelectorAll(".f>a")).map(function(t){return[].slice.call(t).map(function(t){var e=[].slice.call(document.querySelectorAll(".t>a")).find(function(e){return n(e)===n(t)});return e?{local:e,remote:t}:void 0}).filter(function(t){return!!t})}).subscribe(function(t){t.filter(function(t){return!e.urlTester.test(t.remote.href)}).forEach(function(t){t.local.href=t.remote.href,t.local.setAttribute(e.status.done,"1"),e.DEBUG&&(t.local.style.backgroundColor="red")})})},e.prototype.log=function(){console.log("bootstrap baidu")},e}(s.RedirectOnRequest);Object.defineProperty(e,"__esModule",{value:!0}),e.default=new c(/www\.baidu\.com/,/www\.baidu\.com\/link\?url=/,null,"#content_left a")},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(0),i=r(15),u=i.CONFIG.debug,s=r(6),c=function(t){function e(e,r,n){return t.call(this,e,r,n)||this}return n(e,t),e.prototype.handlerOneEle=function(t){return o.Observable.of(t).do(function(t){t.getAttribute("onmousedown")&&(t.removeAttribute("onmousedown"),u&&(t.style.backgroundColor="green")),t.getAttribute("data-href")&&(t.href=t.getAttribute("data-href"),u&&(t.style.backgroundColor="green"))})},e.prototype.log=function(){console.log("bootstrap google")},e}(s.RedirectOnUrl);Object.defineProperty(e,"__esModule",{value:!0}),e.default=new c(/www\.google\./,null,null)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(6),i=function(t){function e(e,r,n){return t.call(this,e,r,n)||this}return n(e,t),e.prototype.log=function(){console.log("bootstrap 360 so")},e}(o.RedirectOnUrl);Object.defineProperty(e,"__esModule",{value:!0}),e.default=new i(/www\.so\.com/,/so\.com\/link\?url=/,/so\.com\/link\?url=(.*)/)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(6),i=function(t){function e(e,r,n){return t.call(this,e,r,n)||this}return n(e,t),e.prototype.log=function(){console.log("bootstrap zhihu daily")},e}(o.RedirectOnUrl);Object.defineProperty(e,"__esModule",{value:!0}),e.default=new i(/daily\.zhihu\.com/,/zhihu\.com\/\?target=/,/zhihu\.com\/\?target=(.*)/)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(6),i=function(t){function e(e,r,n){return t.call(this,e,r,n)||this}return n(e,t),e.prototype.log=function(){console.log("bootstrap zhihu")},e}(o.RedirectOnUrl);Object.defineProperty(e,"__esModule",{value:!0}),e.default=new i(/www\.zhihu\.com/,/zhihu\.com\/\?target=/,/zhihu\.com\/\?target=(.*)/)},function(t,e,r){/*! +!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,e,r){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=84)}([function(t,e,r){"use strict";var n=r(2),i=r(80),o=r(11),s=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,o=i.toSubscriber(t,e,r);if(n?n.call(o,this):o.add(this._subscribe(o)),o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype.forEach=function(t,e){var r=this;if(e||(n.root.Rx&&n.root.Rx.config&&n.root.Rx.config.Promise?e=n.root.Rx.config.Promise:n.root.Promise&&(e=n.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,n){var i=r.subscribe(function(e){if(i)try{t(e)}catch(t){n(t),i.unsubscribe()}else t(e)},n,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[o.$$observable]=function(){return this},t.create=function(e){return new t(e)},t}();e.Observable=s},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(14),o=r(8),s=r(17),u=r(20),c=function(t){function e(r,n,i){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=s.empty;break;case 1:if(!r){this.destination=s.empty;break}if("object"==typeof r){r instanceof e?(this.destination=r,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new a(this,r));break}default:this.syncErrorThrowable=!0,this.destination=new a(this,r,n,i)}}return n(e,t),e.prototype[u.$$rxSubscriber]=function(){return this},e.create=function(t,r,n){var i=new e(t,r,n);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e}(o.Subscription);e.Subscriber=c;var a=function(t){function e(e,r,n,o){t.call(this),this._parent=e;var s,u=this;i.isFunction(r)?s=r:r&&(u=r,s=r.next,n=r.error,o=r.complete,i.isFunction(u.unsubscribe)&&this.add(u.unsubscribe.bind(u)),u.unsubscribe=this.unsubscribe.bind(this)),this._context=u,this._next=s,this._error=n,this._complete=o}return n(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parent;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parent;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){if(!this.isStopped){var t=this._parent;this._complete?t.syncErrorThrowable?(this.__tryOrSetError(t,this._complete),this.unsubscribe()):(this.__tryOrUnsub(this._complete),this.unsubscribe()):this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,r){try{e.call(this._context,r)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parent;this._context=null,this._parent=null,t.unsubscribe()},e}(c)},function(t,e,r){"use strict";(function(t){if(e.root="object"==typeof window&&window.window===window&&window||"object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t,!e.root)throw new Error("RxJS could not find any global context (window, self, global)")}).call(e,r(83))},function(t,e,r){"use strict";var n=r(0),i=r(15),o=i.CONFIG.debug,s=function(){function t(t,e,r,n){void 0===n&&(n="a"),this.domainTester=t,this.urlTester=e,this.matcher=r,this.ASelector=n,this.match=!1,this.DEBUG=o,this.logCount=0,this.match=t.test(document.domain)}return t.prototype.handlerOneEle=function(t){var e=this;return n.Observable.of(t).filter(function(t){return e.urlTester.test(t.href)}).do(function(t){var r=e.matcher.exec(t.href);if(r&&r.length&&r[1]){var n=decodeURIComponent(r[1]);n&&(t.href=n,o&&(t.style.backgroundColor="green"))}})},t.prototype.scroll=function(){var t=this;return n.Observable.fromEvent(document,"scroll").debounceTime(500).flatMap(function(){return n.Observable.from([].slice.call(document.querySelectorAll(t.ASelector)))}).subscribe(function(e){t.handlerOneEle(e).subscribe(function(){})})},t.prototype.mouseover=function(){return n.Observable.fromEvent(document,"mousemove").debounce(function(){return n.Observable.timer(100)}).map(function(t){var e=t.target;return"A"===e.nodeName?e:"A"===e.parentNode.nodeName?e.parentNode:e}).filter(function(t){return"A"===t.nodeName})},t.prototype.log=function(t){this.logCount<1&&(console.log("%c Anti-Redirect %c Copyright © 2015-%s %s",'font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size:64px;color:#00bbee;-webkit-text-fill-color:#00bbee;-webkit-text-stroke: 1px #00bbee;',"font-size:12px;color:#999999;",(new Date).getFullYear(),"\n"+(t||"")),this.logCount++)},t.prototype.bootstrap=function(){var t=this;this.match&&n.Observable.fromEvent(document,"DOMContentLoaded").delay(300).subscribe(function(){t.scroll(),t.mouseover().subscribe(function(e){t.handlerOneEle(e)}),t.log()})},t}();e.RedirectOnUrl=s},function(t,e){"use strict";e.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(1),o=function(t){function e(){t.apply(this,arguments)}return n(e,t),e.prototype.notifyNext=function(t,e,r,n,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(i.Subscriber);e.OuterSubscriber=o},function(t,e,r){"use strict";var n=r(74),i=r(75);e.async=new i.AsyncScheduler(n.AsyncAction)},function(t,e,r){"use strict";function n(t,e,r,n){var f=new a.InnerSubscriber(t,r,n);if(f.closed)return null;if(e instanceof u.Observable)return e._isScalar?(f.next(e.value),f.complete(),null):e.subscribe(f);if(o.isArray(e)){for(var h=0,p=e.length;h1?new e(t,n):1===i?new o.ScalarObservable(t[0],n):new s.EmptyObservable(n)},e.dispatch=function(t){var e=t.array,r=t.index,n=t.count,i=t.subscriber;return r>=n?void i.complete():(i.next(e[r]),void(i.closed||(t.index=r+1,this.schedule(t))))},e.prototype._subscribe=function(t){var r=0,n=this.array,i=n.length,o=this.scheduler;if(o)return o.schedule(e.dispatch,0,{array:n,index:r,count:i,subscriber:t});for(var s=0;s=200&&e.status<400&&e.finalUrl?t.next(e):t.error(e),t.complete())},e.onerror=function(e){n.isFunction(o)&&o.call(this,e),t.error(e),t.complete()},e.onabort=function(e){n.isFunction(s)&&s.call(this,e),t.error(e),t.complete()},e.ontimeout=function(e){n.isFunction(u)&&u.call(this,e),t.error(e),t.complete()},GM_xmlhttpRequest(n.extend({},e))})},t.prototype.get=function(t,e){var r=n.extend(e||{},{url:t,method:"GET"});return this.request(r)},t.prototype.post=function(t,e,r){return this.request(n.extend(r||{},{url:t,method:"POST",data:e}))},t.prototype.head=function(t,e){return this.request(n.extend(e||{},{url:t,method:"HEAD"}))},t}(),s=2e3;e.timeout=s;var u=new o({timeout:s});e.http=u},function(t,e,r){"use strict";var n=r(0),i=r(57);n.Observable.forkJoin=i.forkJoin},function(t,e,r){"use strict";var n=r(0),i=r(58);n.Observable.from=i.from},function(t,e,r){"use strict";var n=r(0),i=r(59);n.Observable.fromEvent=i.fromEvent},function(t,e,r){"use strict";var n=r(0),i=r(60);n.Observable.of=i.of},function(t,e,r){"use strict";var n=r(0),i=r(61);n.Observable.timer=i.timer},function(t,e,r){"use strict";var n=r(0),i=r(62);n.Observable.prototype.debounce=i.debounce},function(t,e,r){"use strict";var n=r(0),i=r(63);n.Observable.prototype.debounceTime=i.debounceTime},function(t,e,r){"use strict";var n=r(0),i=r(64);n.Observable.prototype.delay=i.delay},function(t,e,r){"use strict";var n=r(0),i=r(65);n.Observable.prototype.do=i._do,n.Observable.prototype._do=i._do},function(t,e,r){"use strict";var n=r(0),i=r(66);n.Observable.prototype.filter=i.filter},function(t,e,r){"use strict";var n=r(0),i=r(67);n.Observable.prototype.map=i.map},function(t,e,r){"use strict";var n=r(0),i=r(68);n.Observable.prototype.mergeMap=i.mergeMap,n.Observable.prototype.flatMap=i.mergeMap},function(t,e,r){"use strict";var n=r(0),i=r(70);n.Observable.prototype.retry=i.retry},function(t,e,r){"use strict";var n=r(0),i=r(71);n.Observable.prototype.throttle=i.throttle},function(t,e,r){"use strict";var n=r(0),i=r(72);n.Observable.prototype.timeout=i.timeout},function(t,e,r){"use strict";function n(t){return t.innerText||t.textContent}var i=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(0),s=r(24),u=r(81),c=function(){function t(t){this.queryStr=t,this.object={},this.object=this.toObject(t.replace(/^\?+/,""))}return t.prototype.toObject=function(t){var e={};return t.split("&").forEach(function(t){var r=t.split("=")||[],n=r[0]||"";e[n]=r[1]||""}),e},t.prototype.toString=function(){var t=[];for(var e in this.object)if(this.object.hasOwnProperty(e)){var r=this.object[e];t.push(e+"="+r)}return"?"+t.join("&")},t}(),a=function(t){function e(e,r,n,i){return void 0===i&&(i="a"),t.call(this,e,r,n,i)||this}return i(e,t),e.prototype.handlerAll=function(){var t=this;if(/www\.baidu\.com\/s/.test(window.top.location.href)){var e=new c(window.top.location.search),r=e.object.pn||0;e.object.tn="baidulocal",e.object.timestamp=(new Date).getTime(),e.object.rn=50;var n=location.protocol+"://"+(location.host+location.pathname+e);o.Observable.forkJoin(s.http.get(n),s.http.get(n.replace(/pn=(\d+)/,"pn="+(r+10)))).retry(2).timeout(s.timeout).subscribe(function(e){e&&e.length&&e.forEach(function(e){return t.handlerAllOne(e)})})}},e.prototype.handlerAllOne=function(t){var e=this,r=t.responseText.replace(/(src=[^>]*|link=[^>])/g,""),i=document.createElement("html");i.innerHTML=r,o.Observable.of(i.querySelectorAll(".f>a")).map(function(t){return[].slice.call(t).map(function(t){var e=[].slice.call(document.querySelectorAll(".t>a")).find(function(e){return n(e)===n(t)});return e?{local:e,remote:t}:void 0}).filter(function(t){return!!t})}).subscribe(function(t){t.filter(function(t){return!e.urlTester.test(t.remote.href)}).forEach(function(t){t.local.href=t.remote.href,t.local.setAttribute(e.status.done,"1"),e.DEBUG&&(t.local.style.backgroundColor="red")})})},e}(u.RedirectOnRequest);Object.defineProperty(e,"__esModule",{value:!0}),e.default=new a(/www\.baidu\.com/,/www\.baidu\.com\/link\?url=/,null,"#content_left a")},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(0),o=r(15),s=o.CONFIG.debug,u=r(3),c=function(t){function e(e,r,n){return t.call(this,e,r,n)||this}return n(e,t),e.prototype.handlerOneEle=function(t){return i.Observable.of(t).do(function(t){t.getAttribute("onmousedown")&&(t.removeAttribute("onmousedown"),s&&(t.style.backgroundColor="green")),t.getAttribute("data-href")&&(t.href=t.getAttribute("data-href"),s&&(t.style.backgroundColor="green"))})},e}(u.RedirectOnUrl);Object.defineProperty(e,"__esModule",{value:!0}),e.default=new c(/www\.google\./,null,null)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(3),o=function(t){function e(e,r,n){return t.call(this,e,r,n)||this}return n(e,t),e}(i.RedirectOnUrl);Object.defineProperty(e,"__esModule",{value:!0}),e.default=new o(/www\.so\.com/,/so\.com\/link\?url=/,/so\.com\/link\?url=(.*)/)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(0),o=r(3),s=function(t){function e(e,r,n){return t.call(this,e,r,n)||this}return n(e,t),e.prototype.handlerOneEle=function(t){var e=this;return i.Observable.of(t).filter(function(t){return e.urlTester.test(t.href)&&/^https?:\/\//.test(t.title)}).do(function(t){var r=decodeURIComponent(t.title);r&&(t.href=r,e.DEBUG&&(t.style.backgroundColor="green"))})},e}(o.RedirectOnUrl);Object.defineProperty(e,"__esModule",{value:!0}),e.default=new s(/twitter\.com/,/t\.co\/\w+/,null)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(0),o=r(3),s=function(t){function e(e,r,n){return t.call(this,e,r,n)||this}return n(e,t),e.prototype.handlerOneEle=function(t){var e=this;return i.Observable.of(t).filter(function(t){return e.urlTester.test(t.href)&&/^https?:\/\//.test(t.title)}).do(function(t){var r=decodeURIComponent(t.title);r&&(t.href=r,e.DEBUG&&(t.style.backgroundColor="green"))})},e}(o.RedirectOnUrl);Object.defineProperty(e,"__esModule",{value:!0}),e.default=new s(/weibo\.com/,/t\.cn\/\w+/,null)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(3),o=function(t){function e(e,r,n){return t.call(this,e,r,n)||this}return n(e,t),e}(i.RedirectOnUrl);Object.defineProperty(e,"__esModule",{value:!0}),e.default=new o(/daily\.zhihu\.com/,/zhihu\.com\/\?target=/,/zhihu\.com\/\?target=(.*)/)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(3),o=function(t){function e(e,r,n){return t.call(this,e,r,n)||this}return n(e,t),e}(i.RedirectOnUrl);Object.defineProperty(e,"__esModule",{value:!0}),e.default=new o(/www\.zhihu\.com/,/zhihu\.com\/\?target=/,/zhihu\.com\/\?target=(.*)/)},function(t,e,r){/*! * in-view 0.6.0 - Get notified when a DOM element enters or exits the viewport. * Copyright (c) 2016 Cam Wiegert - https://camwiegert.github.io/in-view * License: MIT */ -!function(e,r){t.exports=r()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=r(2),i=n(o);t.exports=i.default},function(t,e){function r(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=r(9),i=n(o),u=r(3),s=n(u),c=r(4),a=function(){if("undefined"!=typeof window){var t=100,e=["scroll","resize","load"],r={history:[]},n={offset:{},threshold:0,test:c.inViewport},o=(0,i.default)(function(){r.history.forEach(function(t){r[t].check()})},t);e.forEach(function(t){return addEventListener(t,o)}),window.MutationObserver&&new MutationObserver(o).observe(document.body,{attributes:!0,childList:!0,subtree:!0});var u=function(t){if("string"==typeof t){var e=[].slice.call(document.querySelectorAll(t));return r.history.indexOf(t)>-1?r[t].elements=e:(r[t]=(0,s.default)(e,n),r.history.push(t)),r[t]}};return u.offset=function(t){if(void 0===t)return n.offset;var e=function(t){return"number"==typeof t};return["top","right","bottom","left"].forEach(e(t)?function(e){return n.offset[e]=t}:function(r){return e(t[r])?n.offset[r]=t[r]:null}),n.offset},u.threshold=function(t){return"number"==typeof t&&t>=0&&t<=1?n.threshold=t:n.threshold},u.test=function(t){return"function"==typeof t?n.test=t:n.test},u.is=function(t){return n.test(t,n)},u.offset(0),u}};e.default=a()},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r-1,i=r&&!o,u=!r&&o;i&&(t.current.push(e),t.emit("enter",e)),u&&(t.current.splice(n,1),t.emit("exit",e))}),this}},{key:"on",value:function(t,e){return this.handlers[t].push(e),this}},{key:"once",value:function(t,e){return this.singles[t].unshift(e),this}},{key:"emit",value:function(t,e){for(;this.singles[t].length;)this.singles[t].pop()(e);for(var r=this.handlers[t].length;--r>-1;)this.handlers[t][r](e);return this}}]),t}();e.default=function(t,e){return new o(t,e)}},function(t,e){"use strict";function r(t,e){var r=t.getBoundingClientRect(),n=r.top,o=r.right,i=r.bottom,u=r.left,s=r.width,c=r.height,a={t:i,r:window.innerWidth-u,b:window.innerHeight-n,l:o},l={x:e.threshold*s,y:e.threshold*c};return a.t>e.offset.top+l.y&&a.r>e.offset.right+l.x&&a.b>e.offset.bottom+l.y&&a.l>e.offset.left+l.x}Object.defineProperty(e,"__esModule",{value:!0}),e.inViewport=r},function(t,e){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(e,function(){return this}())},function(t,e,r){var n=r(5),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},function(t,e,r){function n(t,e,r){function n(e){var r=m,n=w;return m=w=void 0,S=e,_=t.apply(n,r)}function l(t){return S=t,g=setTimeout(p,e),E?n(t):_}function f(t){var r=t-x,n=t-S,o=e-r;return j?a(o,O-n):o}function h(t){var r=t-x,n=t-S;return void 0===x||r>=e||r<0||j&&n>=O}function p(){var t=i();return h(t)?d(t):void(g=setTimeout(p,f(t)))}function d(t){return g=void 0,A&&m?n(t):(m=w=void 0,_)}function b(){void 0!==g&&clearTimeout(g),S=0,m=x=w=g=void 0}function v(){return void 0===g?_:d(i())}function y(){var t=i(),r=h(t);if(m=arguments,w=this,x=t,r){if(void 0===g)return l(x);if(j)return g=setTimeout(p,e),n(x)}return void 0===g&&(g=setTimeout(p,e)),_}var m,w,O,_,g,x,S=0,E=!1,j=!1,A=!0;if("function"!=typeof t)throw new TypeError(s);return e=u(e)||0,o(r)&&(E=!!r.leading,j="maxWait"in r,O=j?c(u(r.maxWait)||0,e):O,A="trailing"in r?!!r.trailing:A),y.cancel=b,y.flush=v,y}var o=r(1),i=r(8),u=r(10),s="Expected a function",c=Math.max,a=Math.min;t.exports=n},function(t,e,r){var n=r(6),o=function(){return n.Date.now()};t.exports=o},function(t,e,r){function n(t,e,r){var n=!0,s=!0;if("function"!=typeof t)throw new TypeError(u);return i(r)&&(n="leading"in r?!!r.leading:n,s="trailing"in r?!!r.trailing:s),o(t,e,{leading:n,maxWait:e,trailing:s})}var o=r(7),i=r(1),u="Expected a function";t.exports=n},function(t,e){function r(t){return t}t.exports=r}])})},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(1),i=function(t){function e(e,r,n){t.call(this),this.parent=e,this.outerValue=r,this.outerIndex=n,this.index=0}return n(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(o.Subscriber);e.InnerSubscriber=i},function(t,e){"use strict";var r=function(){function t(e,r){void 0===r&&(r=t.now),this.SchedulerAction=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(r,e)},t.now=Date.now?Date.now:function(){return+new Date},t}();e.Scheduler=r},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(0),i=r(19),u=r(8),s=function(t){function e(e,r){t.call(this),this.arrayLike=e,this.scheduler=r,r||1!==e.length||(this._isScalar=!0,this.value=e[0])}return n(e,t),e.create=function(t,r){var n=t.length;return 0===n?new u.EmptyObservable:1===n?new i.ScalarObservable(t[0],r):new e(t,r)},e.dispatch=function(t){var e=t.arrayLike,r=t.index,n=t.length,o=t.subscriber;if(!o.closed){if(r>=n)return void o.complete();o.next(e[r]),t.index=r+1,this.schedule(t)}},e.prototype._subscribe=function(t){var r=0,n=this,o=n.arrayLike,i=n.scheduler,u=o.length;if(i)return i.schedule(e.dispatch,0,{arrayLike:o,index:r,length:u,subscriber:t});for(var s=0;sd?d:e):e}function i(t){return"number"==typeof t&&c.root.isFinite(t)}function u(t){var e=+t;return 0===e?e:isNaN(e)?e:e<0?-1:1}var s=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},c=r(2),a=r(0),l=r(10),f=function(t){function e(e,r){if(t.call(this),this.scheduler=r,null==e)throw new Error("iterator cannot be null.");this.iterator=n(e)}return s(e,t),e.create=function(t,r){return new e(t,r)},e.dispatch=function(t){var e=t.index,r=t.hasError,n=t.iterator,o=t.subscriber;if(r)return void o.error(t.error);var i=n.next();return i.done?void o.complete():(o.next(i.value),t.index=e+1,o.closed?void("function"==typeof n.return&&n.return()):void this.schedule(t))},e.prototype._subscribe=function(t){var r=0,n=this,o=n.iterator,i=n.scheduler;if(i)return i.schedule(e.dispatch,0,{index:r,iterator:o,subscriber:t});for(;;){var u=o.next();if(u.done){t.complete();break}if(t.next(u.value),t.closed){"function"==typeof o.return&&o.return();break}}},e}(a.Observable);e.IteratorObservable=f;var h=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=t.length),this.str=t,this.idx=e,this.len=r}return t.prototype[l.$$iterator]=function(){return this},t.prototype.next=function(){return this.idx0&&r[0].time-n.now()<=0;)r.shift().notification.observe(o);if(r.length>0){var i=Math.max(0,r[0].time-n.now());this.schedule(t,i)}else e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(this.errored!==!0){var e=this.scheduler,r=new f(e.now()+this.delay,t);this.queue.push(r),this.active===!1&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(c.Notification.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t)},e.prototype._complete=function(){this.scheduleNotification(c.Notification.createComplete())},e}(s.Subscriber),f=function(){function t(t,e){this.time=t,this.notification=e}return t}()},function(t,e,r){"use strict";function n(t,e,r){return this.lift(new u(t,e,r))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(1);e._do=n;var u=function(){function t(t,e,r){this.nextOrObserver=t,this.error=e,this.complete=r}return t.prototype.call=function(t,e){return e._subscribe(new s(t,this.nextOrObserver,this.error,this.complete))},t}(),s=function(t){function e(e,r,n,o){t.call(this,e);var u=new i.Subscriber(r,n,o);u.syncErrorThrowable=!0,this.add(u),this.safeSubscriber=u}return o(e,t),e.prototype._next=function(t){var e=this.safeSubscriber;e.next(t),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.next(t)},e.prototype._error=function(t){var e=this.safeSubscriber;e.error(t),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.error(t)},e.prototype._complete=function(){var t=this.safeSubscriber;t.complete(),t.syncErrorThrown?this.destination.error(t.syncErrorValue):this.destination.complete()},e}(i.Subscriber)},function(t,e,r){"use strict";function n(t,e){return this.lift(new u(t,e))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(1);e.filter=n;var u=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e._subscribe(new s(t,this.predicate,this.thisArg))},t}(),s=function(t){function e(e,r,n){t.call(this,e),this.predicate=r,this.thisArg=n,this.count=0,this.predicate=r}return o(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.Subscriber)},function(t,e,r){"use strict";function n(t,e){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return this.lift(new u(t,e))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(1);e.map=n;var u=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e._subscribe(new s(t,this.project,this.thisArg))},t}();e.MapOperator=u;var s=function(t){function e(e,r,n){t.call(this,e),this.project=r,this.count=0,this.thisArg=n||this}return o(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.Subscriber)},function(t,e,r){"use strict";function n(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"number"==typeof e&&(r=e,e=null),this.lift(new s(t,e,r))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(5),u=r(4);e.mergeMap=n;var s=function(){function t(t,e,r){void 0===r&&(r=Number.POSITIVE_INFINITY),this.project=t,this.resultSelector=e,this.concurrent=r}return t.prototype.call=function(t,e){return e._subscribe(new c(t,this.project,this.resultSelector,this.concurrent))},t}();e.MergeMapOperator=s;var c=function(t){function e(e,r,n,o){void 0===o&&(o=Number.POSITIVE_INFINITY),t.call(this,e),this.project=r,this.resultSelector=n,this.concurrent=o,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return o(e,t),e.prototype._next=function(t){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(u.OuterSubscriber);e.MergeMapSubscriber=c},function(t,e,r){"use strict";function n(t,e){return void 0===e&&(e=0),this.lift(new s(t,e))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(1),u=r(16);e.observeOn=n;var s=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e._subscribe(new c(t,this.scheduler,this.delay))},t}();e.ObserveOnOperator=s;var c=function(t){function e(e,r,n){void 0===n&&(n=0),t.call(this,e),this.scheduler=r,this.delay=n}return o(e,t),e.dispatch=function(t){var e=t.notification,r=t.destination;e.observe(r)},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new a(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(u.Notification.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(u.Notification.createError(t))},e.prototype._complete=function(){this.scheduleMessage(u.Notification.createComplete())},e}(i.Subscriber);e.ObserveOnSubscriber=c;var a=function(){function t(t,e){this.notification=t,this.destination=e}return t}();e.ObserveOnMessage=a},function(t,e,r){"use strict";function n(t){return void 0===t&&(t=-1),this.lift(new u(t,this))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(1);e.retry=n;var u=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e._subscribe(new s(t,this.count,this.source))},t}(),s=function(t){function e(e,r,n){t.call(this,e),this.count=r,this.source=n}return o(e,t),e.prototype.error=function(e){if(!this.isStopped){var r=this,n=r.source,o=r.count;if(0===o)return t.prototype.error.call(this,e);o>-1&&(this.count=o-1),this.unsubscribe(),this.isStopped=!1,this.closed=!1,n.subscribe(this)}},e}(i.Subscriber)},function(t,e,r){"use strict";function n(t){return this.lift(new s(t))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(4),u=r(5);e.throttle=n;var s=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e._subscribe(new c(t,this.durationSelector))},t}(),c=function(t){function e(e,r){t.call(this,e),this.destination=e,this.durationSelector=r}return o(e,t),e.prototype._next=function(t){this.throttled||this.tryDurationSelector(t)},e.prototype.tryDurationSelector=function(t){var e=null;try{e=this.durationSelector(t)}catch(t){return void this.destination.error(t)}this.emitAndThrottle(t,e)},e.prototype.emitAndThrottle=function(t,e){this.add(this.throttled=u.subscribeToResult(this,e)),this.destination.next(t)},e.prototype._unsubscribe=function(){var t=this.throttled;t&&(this.remove(t),this.throttled=null,t.unsubscribe())},e.prototype.notifyNext=function(t,e,r,n,o){this._unsubscribe()},e.prototype.notifyComplete=function(){this._unsubscribe()},e}(i.OuterSubscriber)},function(t,e,r){"use strict";function n(t,e,r){void 0===e&&(e=null),void 0===r&&(r=i.async);var n=u.isDate(t),o=n?+t-r.now():Math.abs(t);return this.lift(new a(o,n,e,r))}var o=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(9),u=r(13),s=r(1),c=r(72);e.timeout=n;var a=function(){function t(t,e,r,n){this.waitFor=t,this.absoluteTimeout=e,this.errorToSend=r,this.scheduler=n}return t.prototype.call=function(t,e){return e._subscribe(new l(t,this.absoluteTimeout,this.waitFor,this.errorToSend,this.scheduler))},t}(),l=function(t){function e(e,r,n,o,i){t.call(this,e),this.absoluteTimeout=r,this.waitFor=n,this.errorToSend=o,this.scheduler=i,this.index=0,this._previousIndex=0,this._hasCompleted=!1,this.scheduleTimeout()}return o(e,t),Object.defineProperty(e.prototype,"previousIndex",{get:function(){return this._previousIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasCompleted",{get:function(){return this._hasCompleted},enumerable:!0,configurable:!0}),e.dispatchTimeout=function(t){var e=t.subscriber,r=t.index;e.hasCompleted||e.previousIndex!==r||e.notifyTimeout()},e.prototype.scheduleTimeout=function(){var t=this.index;this.scheduler.schedule(e.dispatchTimeout,this.waitFor,{subscriber:this,index:t}),this.index++,this._previousIndex=t},e.prototype._next=function(t){this.destination.next(t),this.absoluteTimeout||this.scheduleTimeout()},e.prototype._error=function(t){this.destination.error(t),this._hasCompleted=!0},e.prototype._complete=function(){this.destination.complete(),this._hasCompleted=!0},e.prototype.notifyTimeout=function(){this.error(this.errorToSend||new c.TimeoutError)},e}(s.Subscriber)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(7),i=function(t){function e(e,r){t.call(this)}return n(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(o.Subscription);e.Action=i},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(2),i=r(69),u=function(t){function e(e,r){t.call(this,e,r),this.scheduler=e,this.work=r,this.pending=!1}return n(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t,this.pending=!0;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,e)),this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),o.root.setInterval(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){return void 0===r&&(r=0),null!==r&&this.delay===r?e:o.root.clearInterval(e)&&void 0||void 0},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);return r?r:void(this.pending===!1&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null)))},e.prototype._execute=function(t,e){var r=!1,n=void 0;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,r=e.actions,n=r.indexOf(this);this.work=null,this.delay=null,this.state=null,this.pending=!1,this.scheduler=null,n!==-1&&r.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null))},e}(i.Action);e.AsyncAction=u},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(46),i=function(t){function e(){t.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=void 0}return n(e,t),e.prototype.flush=function(t){var e=this.actions;if(this.active)return void e.push(t);var r;this.active=!0;do if(r=t.execute(t.state,t.delay))break;while(t=e.shift());if(this.active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}},e}(o.Scheduler);e.AsyncScheduler=i},function(t,e){"use strict";var r=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},n=function(t){function e(){var e=t.call(this,"Timeout has occurred");this.name=e.name="TimeoutError",this.stack=e.stack,this.message=e.message}return r(e,t),e}(Error);e.TimeoutError=n},function(t,e){"use strict";var r=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},n=function(t){function e(e){t.call(this),this.errors=e;var r=Error.call(this,e?e.length+" errors occurred during unsubscription:\n "+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"");this.name=r.name="UnsubscriptionError",this.stack=r.stack,this.message=r.message}return r(e,t),e}(Error);e.UnsubscriptionError=n},function(t,e,r){"use strict";function n(t){return!o.isArray(t)&&t-parseFloat(t)+1>=0}var o=r(3);e.isNumeric=n},function(t,e){"use strict";function r(t){return null!=t&&"object"==typeof t}e.isObject=r},function(t,e,r){"use strict";function n(t,e,r){if(t){if(t instanceof o.Subscriber)return t;if(t[i.$$rxSubscriber])return t[i.$$rxSubscriber]()}return t||e||r?new o.Subscriber(t,e,r):new o.Subscriber(u.empty); -}var o=r(1),i=r(20),u=r(17);e.toSubscriber=n},function(t,e,r){"use strict";var n,o=r(0),i=r(24),u=r(15),s=u.CONFIG.debug,c={ing:"redirect-ing",done:"redirect-done"},a=function(){function t(t,e,r,n){void 0===n&&(n="a"),this.domainTester=t,this.urlTester=e,this.matcher=r,this.ASelector=n,this.DEBUG=s,this.status=c,this.match=t.test(document.domain)}return t.prototype.handlerOneEle=function(t){var e=this;if(this.urlTester.test(t.href)&&!t.getAttribute(c.ing)&&!t.getAttribute(c.done)){var r=t.href.replace(/^https?/,"https")+("×tamp="+(new Date).getTime());t.style.cursor="progress",t.setAttribute(c.ing,"1"),i.http.get(r).retry(2).timeout(i.timeout).map(function(t){if(e.urlTester.test(t.finalUrl)){if(!t.response||/<\/noscript>$/.test(t.response.trim()))throw t;var r=t.response.match(/URL=\'?https?:\/\/[^'"]+/).join("").match(/https?:\/\/[^'"]+/)[0];if(!r||!/^https?/.test(r)||e.urlTester.test(r))throw t;t.finalUrl=r}return t}).subscribe(function(e){t.href=e.finalUrl,t.removeAttribute(c.ing),t.setAttribute(c.done,"1"),s&&(t.style.backgroundColor="green")},function(e){t.style.cursor=null,t.removeAttribute(c.ing)},function(){t.style.cursor=null,t.removeAttribute(c.ing)})}},t.prototype.handlerOneEleOneByOne=function(){var t=this;o.Observable.from([].slice.call(document.querySelectorAll("#content_left a"))).subscribe(function(e){n&&n.is(e)&&t.handlerOneEle(e)})},t.prototype.handlerAll=function(){for(var t=[],e=0;e=0&&i0?0:s-1;return arguments.length<3&&(o=r[u?u[c]:c],c+=t),e(r,n,o,u,c,s)}}function i(t){return function(e,r,n){r=S(r,n);for(var o=N(e),i=t>0?0:o-1;i>=0&&i0?u=i>=0?i:Math.max(i+s,u):s=i>=0?Math.min(i+1,s):i+s+1;else if(r&&i&&s)return i=r(n,o),n[i]===o?i:-1;if(o!==o)return i=e(d.call(n,u,s),g.isNaN),i>=0?i+u:-1;for(i=t>0?u:s-1;i>=0&&i=0&&e<=T};g.each=g.forEach=function(t,e,r){e=x(e,r);var n,o;if(k(t))for(n=0,o=t.length;n=0},g.invoke=function(t,e){var r=d.call(arguments,2),n=g.isFunction(e);return g.map(t,function(t){var o=n?e:t[e];return null==o?o:o.apply(t,r)})},g.pluck=function(t,e){return g.map(t,g.property(e))},g.where=function(t,e){return g.filter(t,g.matcher(e))},g.findWhere=function(t,e){return g.find(t,g.matcher(e))},g.max=function(t,e,r){var n,o,i=-(1/0),u=-(1/0);if(null==e&&null!=t){t=k(t)?t:g.values(t);for(var s=0,c=t.length;si&&(i=n)}else e=S(e,r),g.each(t,function(t,r,n){o=e(t,r,n),(o>u||o===-(1/0)&&i===-(1/0))&&(i=t,u=o)});return i},g.min=function(t,e,r){var n,o,i=1/0,u=1/0;if(null==e&&null!=t){t=k(t)?t:g.values(t);for(var s=0,c=t.length;sn||void 0===r)return 1;if(re?(u&&(clearTimeout(u),u=null),s=a,i=t.apply(n,o),u||(n=o=null)):u||r.trailing===!1||(u=setTimeout(c,l)),i}},g.debounce=function(t,e,r){var n,o,i,u,s,c=function(){var a=g.now()-u;a=0?n=setTimeout(c,e-a):(n=null,r||(s=t.apply(i,o),n||(i=o=null)))};return function(){i=this,o=arguments,u=g.now();var a=r&&!n;return n||(n=setTimeout(c,e)),a&&(s=t.apply(i,o),i=o=null),s}},g.wrap=function(t,e){return g.partial(e,t)},g.negate=function(t){return function(){return!t.apply(this,arguments)}},g.compose=function(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}},g.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},g.before=function(t,e){var r;return function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=null),r}},g.once=g.partial(g.before,2);var F=!{toString:null}.propertyIsEnumerable("toString"),C=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];g.keys=function(t){if(!g.isObject(t))return[];if(m)return m(t);var e=[];for(var r in t)g.has(t,r)&&e.push(r);return F&&s(t,e),e},g.allKeys=function(t){if(!g.isObject(t))return[];var e=[];for(var r in t)e.push(r);return F&&s(t,e),e},g.values=function(t){for(var e=g.keys(t),r=e.length,n=Array(r),o=0;o":">",'"':""","'":"'","`":"`"},V=g.invert(R),L=function(t){var e=function(e){return t[e]},r="(?:"+g.keys(t).join("|")+")",n=RegExp(r),o=RegExp(r,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(o,e):t}};g.escape=L(R),g.unescape=L(V),g.result=function(t,e,r){var n=null==t?void 0:t[e];return void 0===n&&(n=r),g.isFunction(n)?n.call(t):n};var q=0;g.uniqueId=function(t){var e=++q+"";return t?t+e:e},g.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var D=/(.)^/,U={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},z=/\\|'|\r|\n|\u2028|\u2029/g,B=function(t){return"\\"+U[t]};g.template=function(t,e,r){!e&&r&&(e=r),e=g.defaults({},e,g.templateSettings);var n=RegExp([(e.escape||D).source,(e.interpolate||D).source,(e.evaluate||D).source].join("|")+"|$","g"),o=0,i="__p+='";t.replace(n,function(e,r,n,u,s){return i+=t.slice(o,s).replace(z,B),o=s+e.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?i+="'+\n((__t=("+n+"))==null?'':__t)+\n'":u&&(i+="';\n"+u+"\n__p+='"),e}),i+="';\n",e.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var u=new Function(e.variable||"obj","_",i)}catch(t){throw t.source=i,t}var s=function(t){return u.call(this,t,g)},c=e.variable||"obj";return s.source="function("+c+"){\n"+i+"}",s},g.chain=function(t){var e=g(t);return e._chain=!0,e};var G=function(t,e){return t._chain?g(e).chain():e};g.mixin=function(t){g.each(g.functions(t),function(e){var r=g[e]=t[e];g.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),G(this,r.apply(g,t))}})},g.mixin(g),g.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=l[t];g.prototype[t]=function(){var r=this._wrapped;return e.apply(r,arguments),"shift"!==t&&"splice"!==t||0!==r.length||delete r[0],G(this,r)}}),g.each(["concat","join","slice"],function(t){var e=l[t];g.prototype[t]=function(){return G(this,e.apply(this._wrapped,arguments))}}),g.prototype.value=function(){return this._wrapped},g.prototype.valueOf=g.prototype.toJSON=g.prototype.value,g.prototype.toString=function(){return""+this._wrapped},n=[],o=function(){return g}.apply(e,n),!(void 0!==o&&(t.exports=o))}).call(this)},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";r(26),r(28),r(27),r(29),r(25),r(37),r(34),r(33),r(30),r(32),r(35),r(36),r(38),r(31);var n=r(39),o=r(40),i=r(41),u=r(43),s=r(42);n.default.bootstrap(),o.default.bootstrap(),i.default.bootstrap(),u.default.bootstrap(),s.default.bootstrap()}]); \ No newline at end of file +!function(e,r){t.exports=r()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(2),o=n(i);t.exports=o.default},function(t,e){function r(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(9),o=n(i),s=r(3),u=n(s),c=r(4),a=function(){if("undefined"!=typeof window){var t=100,e=["scroll","resize","load"],r={history:[]},n={offset:{},threshold:0,test:c.inViewport},i=(0,o.default)(function(){r.history.forEach(function(t){r[t].check()})},t);e.forEach(function(t){return addEventListener(t,i)}),window.MutationObserver&&new MutationObserver(i).observe(document.body,{attributes:!0,childList:!0,subtree:!0});var s=function(t){if("string"==typeof t){var e=[].slice.call(document.querySelectorAll(t));return r.history.indexOf(t)>-1?r[t].elements=e:(r[t]=(0,u.default)(e,n),r.history.push(t)),r[t]}};return s.offset=function(t){if(void 0===t)return n.offset;var e=function(t){return"number"==typeof t};return["top","right","bottom","left"].forEach(e(t)?function(e){return n.offset[e]=t}:function(r){return e(t[r])?n.offset[r]=t[r]:null}),n.offset},s.threshold=function(t){return"number"==typeof t&&t>=0&&t<=1?n.threshold=t:n.threshold},s.test=function(t){return"function"==typeof t?n.test=t:n.test},s.is=function(t){return n.test(t,n)},s.offset(0),s}};e.default=a()},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r-1,o=r&&!i,s=!r&&i;o&&(t.current.push(e),t.emit("enter",e)),s&&(t.current.splice(n,1),t.emit("exit",e))}),this}},{key:"on",value:function(t,e){return this.handlers[t].push(e),this}},{key:"once",value:function(t,e){return this.singles[t].unshift(e),this}},{key:"emit",value:function(t,e){for(;this.singles[t].length;)this.singles[t].pop()(e);for(var r=this.handlers[t].length;--r>-1;)this.handlers[t][r](e);return this}}]),t}();e.default=function(t,e){return new i(t,e)}},function(t,e){"use strict";function r(t,e){var r=t.getBoundingClientRect(),n=r.top,i=r.right,o=r.bottom,s=r.left,u=r.width,c=r.height,a={t:o,r:window.innerWidth-s,b:window.innerHeight-n,l:i},l={x:e.threshold*u,y:e.threshold*c};return a.t>e.offset.top+l.y&&a.r>e.offset.right+l.x&&a.b>e.offset.bottom+l.y&&a.l>e.offset.left+l.x}Object.defineProperty(e,"__esModule",{value:!0}),e.inViewport=r},function(t,e){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(e,function(){return this}())},function(t,e,r){var n=r(5),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},function(t,e,r){function n(t,e,r){function n(e){var r=m,n=w;return m=w=void 0,S=e,_=t.apply(n,r)}function l(t){return S=t,x=setTimeout(p,e),j?n(t):_}function f(t){var r=t-g,n=t-S,i=e-r;return E?a(i,O-n):i}function h(t){var r=t-g,n=t-S;return void 0===g||r>=e||r<0||E&&n>=O}function p(){var t=o();return h(t)?d(t):void(x=setTimeout(p,f(t)))}function d(t){return x=void 0,T&&m?n(t):(m=w=void 0,_)}function b(){void 0!==x&&clearTimeout(x),S=0,m=g=w=x=void 0}function v(){return void 0===x?_:d(o())}function y(){var t=o(),r=h(t);if(m=arguments,w=this,g=t,r){if(void 0===x)return l(g);if(E)return x=setTimeout(p,e),n(g)}return void 0===x&&(x=setTimeout(p,e)),_}var m,w,O,_,x,g,S=0,j=!1,E=!1,T=!0;if("function"!=typeof t)throw new TypeError(u);return e=s(e)||0,i(r)&&(j=!!r.leading,E="maxWait"in r,O=E?c(s(r.maxWait)||0,e):O,T="trailing"in r?!!r.trailing:T),y.cancel=b,y.flush=v,y}var i=r(1),o=r(8),s=r(10),u="Expected a function",c=Math.max,a=Math.min;t.exports=n},function(t,e,r){var n=r(6),i=function(){return n.Date.now()};t.exports=i},function(t,e,r){function n(t,e,r){var n=!0,u=!0;if("function"!=typeof t)throw new TypeError(s);return o(r)&&(n="leading"in r?!!r.leading:n,u="trailing"in r?!!r.trailing:u),i(t,e,{leading:n,maxWait:e,trailing:u})}var i=r(7),o=r(1),s="Expected a function";t.exports=n},function(t,e){function r(t){return t}t.exports=r}])})},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(1),o=function(t){function e(e,r,n){t.call(this),this.parent=e,this.outerValue=r,this.outerIndex=n,this.index=0}return n(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(i.Subscriber);e.InnerSubscriber=o},function(t,e){"use strict";var r=function(){function t(e,r){void 0===r&&(r=t.now),this.SchedulerAction=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(r,e)},t.now=Date.now?Date.now:function(){return+new Date},t}();e.Scheduler=r},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(0),o=r(19),s=r(9),u=function(t){function e(e,r){t.call(this),this.arrayLike=e,this.scheduler=r,r||1!==e.length||(this._isScalar=!0,this.value=e[0])}return n(e,t),e.create=function(t,r){var n=t.length;return 0===n?new s.EmptyObservable:1===n?new o.ScalarObservable(t[0],r):new e(t,r)},e.dispatch=function(t){var e=t.arrayLike,r=t.index,n=t.length,i=t.subscriber;if(!i.closed){if(r>=n)return void i.complete();i.next(e[r]),t.index=r+1,this.schedule(t)}},e.prototype._subscribe=function(t){var r=0,n=this,i=n.arrayLike,o=n.scheduler,s=i.length;if(o)return o.schedule(e.dispatch,0,{arrayLike:i,index:r,length:s,subscriber:t});for(var u=0;ud?d:e):e}function o(t){return"number"==typeof t&&c.root.isFinite(t)}function s(t){var e=+t;return 0===e?e:isNaN(e)?e:e<0?-1:1}var u=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},c=r(2),a=r(0),l=r(10),f=function(t){function e(e,r){if(t.call(this),this.scheduler=r,null==e)throw new Error("iterator cannot be null.");this.iterator=n(e)}return u(e,t),e.create=function(t,r){return new e(t,r)},e.dispatch=function(t){var e=t.index,r=t.hasError,n=t.iterator,i=t.subscriber;if(r)return void i.error(t.error);var o=n.next();return o.done?void i.complete():(i.next(o.value),t.index=e+1,i.closed?void("function"==typeof n.return&&n.return()):void this.schedule(t))},e.prototype._subscribe=function(t){var r=0,n=this,i=n.iterator,o=n.scheduler;if(o)return o.schedule(e.dispatch,0,{index:r,iterator:i,subscriber:t});for(;;){var s=i.next();if(s.done){t.complete();break}if(t.next(s.value),t.closed){"function"==typeof i.return&&i.return();break}}},e}(a.Observable);e.IteratorObservable=f;var h=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=t.length),this.str=t,this.idx=e,this.len=r}return t.prototype[l.$$iterator]=function(){return this},t.prototype.next=function(){return this.idx0&&r[0].time-n.now()<=0;)r.shift().notification.observe(i);if(r.length>0){var o=Math.max(0,r[0].time-n.now());this.schedule(t,o)}else e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(this.errored!==!0){var e=this.scheduler,r=new f(e.now()+this.delay,t);this.queue.push(r),this.active===!1&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(c.Notification.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t)},e.prototype._complete=function(){this.scheduleNotification(c.Notification.createComplete())},e}(u.Subscriber),f=function(){function t(t,e){this.time=t,this.notification=e}return t}()},function(t,e,r){"use strict";function n(t,e,r){return this.lift(new s(t,e,r))}var i=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(1);e._do=n;var s=function(){function t(t,e,r){this.nextOrObserver=t,this.error=e,this.complete=r}return t.prototype.call=function(t,e){return e._subscribe(new u(t,this.nextOrObserver,this.error,this.complete))},t}(),u=function(t){function e(e,r,n,i){t.call(this,e);var s=new o.Subscriber(r,n,i);s.syncErrorThrowable=!0,this.add(s),this.safeSubscriber=s}return i(e,t),e.prototype._next=function(t){var e=this.safeSubscriber;e.next(t),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.next(t)},e.prototype._error=function(t){var e=this.safeSubscriber;e.error(t),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.error(t)},e.prototype._complete=function(){var t=this.safeSubscriber;t.complete(),t.syncErrorThrown?this.destination.error(t.syncErrorValue):this.destination.complete()},e}(o.Subscriber)},function(t,e,r){"use strict";function n(t,e){return this.lift(new s(t,e))}var i=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(1);e.filter=n;var s=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e._subscribe(new u(t,this.predicate,this.thisArg))},t}(),u=function(t){function e(e,r,n){t.call(this,e),this.predicate=r,this.thisArg=n,this.count=0,this.predicate=r}return i(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(o.Subscriber)},function(t,e,r){"use strict";function n(t,e){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return this.lift(new s(t,e))}var i=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(1);e.map=n;var s=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e._subscribe(new u(t,this.project,this.thisArg))},t}();e.MapOperator=s;var u=function(t){function e(e,r,n){t.call(this,e),this.project=r,this.count=0,this.thisArg=n||this}return i(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(o.Subscriber)},function(t,e,r){"use strict";function n(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"number"==typeof e&&(r=e,e=null),this.lift(new u(t,e,r))}var i=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(7),s=r(5);e.mergeMap=n;var u=function(){function t(t,e,r){void 0===r&&(r=Number.POSITIVE_INFINITY),this.project=t,this.resultSelector=e,this.concurrent=r}return t.prototype.call=function(t,e){return e._subscribe(new c(t,this.project,this.resultSelector,this.concurrent))},t}();e.MergeMapOperator=u;var c=function(t){function e(e,r,n,i){void 0===i&&(i=Number.POSITIVE_INFINITY),t.call(this,e),this.project=r,this.resultSelector=n,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return i(e,t),e.prototype._next=function(t){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(s.OuterSubscriber);e.MergeMapSubscriber=c},function(t,e,r){"use strict";function n(t,e){return void 0===e&&(e=0),this.lift(new u(t,e))}var i=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(1),s=r(16);e.observeOn=n;var u=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e._subscribe(new c(t,this.scheduler,this.delay))},t}();e.ObserveOnOperator=u;var c=function(t){function e(e,r,n){void 0===n&&(n=0),t.call(this,e),this.scheduler=r,this.delay=n}return i(e,t),e.dispatch=function(t){var e=t.notification,r=t.destination;e.observe(r)},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new a(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(s.Notification.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(s.Notification.createError(t))},e.prototype._complete=function(){this.scheduleMessage(s.Notification.createComplete())},e}(o.Subscriber);e.ObserveOnSubscriber=c;var a=function(){function t(t,e){this.notification=t,this.destination=e}return t}();e.ObserveOnMessage=a},function(t,e,r){"use strict";function n(t){return void 0===t&&(t=-1),this.lift(new s(t,this))}var i=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(1);e.retry=n;var s=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e._subscribe(new u(t,this.count,this.source))},t}(),u=function(t){function e(e,r,n){t.call(this,e),this.count=r,this.source=n}return i(e,t),e.prototype.error=function(e){if(!this.isStopped){var r=this,n=r.source,i=r.count;if(0===i)return t.prototype.error.call(this,e);i>-1&&(this.count=i-1),this.unsubscribe(),this.isStopped=!1,this.closed=!1,n.subscribe(this)}},e}(o.Subscriber)},function(t,e,r){"use strict";function n(t){return this.lift(new u(t))}var i=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(5),s=r(7);e.throttle=n;var u=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e._subscribe(new c(t,this.durationSelector))},t}(),c=function(t){function e(e,r){t.call(this,e),this.destination=e,this.durationSelector=r}return i(e,t),e.prototype._next=function(t){this.throttled||this.tryDurationSelector(t)},e.prototype.tryDurationSelector=function(t){var e=null;try{e=this.durationSelector(t)}catch(t){return void this.destination.error(t)}this.emitAndThrottle(t,e)},e.prototype.emitAndThrottle=function(t,e){this.add(this.throttled=s.subscribeToResult(this,e)),this.destination.next(t)},e.prototype._unsubscribe=function(){var t=this.throttled;t&&(this.remove(t),this.throttled=null,t.unsubscribe())},e.prototype.notifyNext=function(t,e,r,n,i){this._unsubscribe()},e.prototype.notifyComplete=function(){this._unsubscribe()},e}(o.OuterSubscriber)},function(t,e,r){"use strict";function n(t,e,r){void 0===e&&(e=null),void 0===r&&(r=o.async);var n=s.isDate(t),i=n?+t-r.now():Math.abs(t);return this.lift(new a(i,n,e,r))}var i=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},o=r(6),s=r(13),u=r(1),c=r(76);e.timeout=n;var a=function(){function t(t,e,r,n){this.waitFor=t,this.absoluteTimeout=e,this.errorToSend=r,this.scheduler=n}return t.prototype.call=function(t,e){return e._subscribe(new l(t,this.absoluteTimeout,this.waitFor,this.errorToSend,this.scheduler))},t}(),l=function(t){function e(e,r,n,i,o){t.call(this,e),this.absoluteTimeout=r,this.waitFor=n,this.errorToSend=i,this.scheduler=o,this.index=0,this._previousIndex=0,this._hasCompleted=!1,this.scheduleTimeout()}return i(e,t),Object.defineProperty(e.prototype,"previousIndex",{get:function(){return this._previousIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasCompleted",{get:function(){return this._hasCompleted},enumerable:!0,configurable:!0}),e.dispatchTimeout=function(t){var e=t.subscriber,r=t.index;e.hasCompleted||e.previousIndex!==r||e.notifyTimeout()},e.prototype.scheduleTimeout=function(){var t=this.index;this.scheduler.schedule(e.dispatchTimeout,this.waitFor,{subscriber:this,index:t}),this.index++,this._previousIndex=t},e.prototype._next=function(t){this.destination.next(t),this.absoluteTimeout||this.scheduleTimeout()},e.prototype._error=function(t){this.destination.error(t),this._hasCompleted=!0},e.prototype._complete=function(){this.destination.complete(),this._hasCompleted=!0},e.prototype.notifyTimeout=function(){this.error(this.errorToSend||new c.TimeoutError)},e}(u.Subscriber)},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(8),o=function(t){function e(e,r){t.call(this)}return n(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(i.Subscription);e.Action=o},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(2),o=r(73),s=function(t){function e(e,r){t.call(this,e,r),this.scheduler=e,this.work=r,this.pending=!1}return n(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t,this.pending=!0;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,e)),this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),i.root.setInterval(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){return void 0===r&&(r=0),null!==r&&this.delay===r?e:i.root.clearInterval(e)&&void 0||void 0},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);return r?r:void(this.pending===!1&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null)))},e.prototype._execute=function(t,e){var r=!1,n=void 0;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,r=e.actions,n=r.indexOf(this);this.work=null,this.delay=null,this.state=null,this.pending=!1,this.scheduler=null,n!==-1&&r.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null))},e}(o.Action);e.AsyncAction=s},function(t,e,r){"use strict";var n=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=r(49),o=function(t){function e(){t.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=void 0}return n(e,t),e.prototype.flush=function(t){var e=this.actions;if(this.active)return void e.push(t);var r;this.active=!0;do if(r=t.execute(t.state,t.delay))break;while(t=e.shift());if(this.active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}},e}(i.Scheduler);e.AsyncScheduler=o},function(t,e){"use strict";var r=this&&this.__extends||function(t,e){function r(){this.constructor=t; +}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},n=function(t){function e(){var e=t.call(this,"Timeout has occurred");this.name=e.name="TimeoutError",this.stack=e.stack,this.message=e.message}return r(e,t),e}(Error);e.TimeoutError=n},function(t,e){"use strict";var r=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},n=function(t){function e(e){t.call(this),this.errors=e;var r=Error.call(this,e?e.length+" errors occurred during unsubscription:\n "+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"");this.name=r.name="UnsubscriptionError",this.stack=r.stack,this.message=r.message}return r(e,t),e}(Error);e.UnsubscriptionError=n},function(t,e,r){"use strict";function n(t){return!i.isArray(t)&&t-parseFloat(t)+1>=0}var i=r(4);e.isNumeric=n},function(t,e){"use strict";function r(t){return null!=t&&"object"==typeof t}e.isObject=r},function(t,e,r){"use strict";function n(t,e,r){if(t){if(t instanceof i.Subscriber)return t;if(t[o.$$rxSubscriber])return t[o.$$rxSubscriber]()}return t||e||r?new i.Subscriber(t,e,r):new i.Subscriber(s.empty)}var i=r(1),o=r(20),s=r(17);e.toSubscriber=n},function(t,e,r){"use strict";var n,i=r(0),o=r(24),s=r(15),u=s.CONFIG.debug,c={ing:"redirect-ing",done:"redirect-done"},a=function(){function t(t,e,r,n){void 0===n&&(n="a"),this.domainTester=t,this.urlTester=e,this.matcher=r,this.ASelector=n,this.DEBUG=u,this.status=c,this.logCount=0,this.match=t.test(document.domain)}return t.prototype.handlerOneEle=function(t){var e=this;if(this.urlTester.test(t.href)&&!t.getAttribute(c.ing)&&!t.getAttribute(c.done)){var r=t.href.replace(/^https?/,"https")+("×tamp="+(new Date).getTime());t.style.cursor="progress",t.setAttribute(c.ing,"1"),o.http.get(r).retry(2).timeout(o.timeout).map(function(t){if(e.urlTester.test(t.finalUrl)){if(!t.response||/<\/noscript>$/.test(t.response.trim()))throw t;var r=t.response.match(/URL=\'?https?:\/\/[^'"]+/).join("").match(/https?:\/\/[^'"]+/)[0];if(!r||!/^https?/.test(r)||e.urlTester.test(r))throw t;t.finalUrl=r}return t}).subscribe(function(e){t.href=e.finalUrl,t.removeAttribute(c.ing),t.setAttribute(c.done,"1"),u&&(t.style.backgroundColor="green")},function(e){t.style.cursor=null,t.removeAttribute(c.ing)},function(){t.style.cursor=null,t.removeAttribute(c.ing)})}},t.prototype.handlerOneEleOneByOne=function(){var t=this;i.Observable.from([].slice.call(document.querySelectorAll("#content_left a"))).subscribe(function(e){n&&n.is(e)&&t.handlerOneEle(e)})},t.prototype.handlerAll=function(){for(var t=[],e=0;e=0&&o0?0:u-1;return arguments.length<3&&(i=r[s?s[c]:c],c+=t),e(r,n,i,s,c,u)}}function o(t){return function(e,r,n){r=S(r,n);for(var i=k(e),o=t>0?0:i-1;o>=0&&o0?s=o>=0?o:Math.max(o+u,s):u=o>=0?Math.min(o+1,u):o+u+1;else if(r&&o&&u)return o=r(n,i),n[o]===i?o:-1;if(i!==i)return o=e(d.call(n,s,u),x.isNaN),o>=0?o+s:-1;for(o=t>0?s:u-1;o>=0&&o=0&&e<=A};x.each=x.forEach=function(t,e,r){e=g(e,r);var n,i;if(N(t))for(n=0,i=t.length;n=0},x.invoke=function(t,e){var r=d.call(arguments,2),n=x.isFunction(e);return x.map(t,function(t){var i=n?e:t[e];return null==i?i:i.apply(t,r)})},x.pluck=function(t,e){return x.map(t,x.property(e))},x.where=function(t,e){return x.filter(t,x.matcher(e))},x.findWhere=function(t,e){return x.find(t,x.matcher(e))},x.max=function(t,e,r){var n,i,o=-(1/0),s=-(1/0);if(null==e&&null!=t){t=N(t)?t:x.values(t);for(var u=0,c=t.length;uo&&(o=n)}else e=S(e,r),x.each(t,function(t,r,n){i=e(t,r,n),(i>s||i===-(1/0)&&o===-(1/0))&&(o=t,s=i)});return o},x.min=function(t,e,r){var n,i,o=1/0,s=1/0;if(null==e&&null!=t){t=N(t)?t:x.values(t);for(var u=0,c=t.length;un||void 0===r)return 1;if(re?(s&&(clearTimeout(s),s=null),u=a,o=t.apply(n,i),s||(n=i=null)):s||r.trailing===!1||(s=setTimeout(c,l)),o}},x.debounce=function(t,e,r){var n,i,o,s,u,c=function(){var a=x.now()-s;a=0?n=setTimeout(c,e-a):(n=null,r||(u=t.apply(o,i),n||(o=i=null)))};return function(){o=this,i=arguments,s=x.now();var a=r&&!n;return n||(n=setTimeout(c,e)),a&&(u=t.apply(o,i),o=i=null),u}},x.wrap=function(t,e){return x.partial(e,t)},x.negate=function(t){return function(){return!t.apply(this,arguments)}},x.compose=function(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}},x.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},x.before=function(t,e){var r;return function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=null),r}},x.once=x.partial(x.before,2);var C=!{toString:null}.propertyIsEnumerable("toString"),F=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];x.keys=function(t){if(!x.isObject(t))return[];if(m)return m(t);var e=[];for(var r in t)x.has(t,r)&&e.push(r);return C&&u(t,e),e},x.allKeys=function(t){if(!x.isObject(t))return[];var e=[];for(var r in t)e.push(r);return C&&u(t,e),e},x.values=function(t){for(var e=x.keys(t),r=e.length,n=Array(r),i=0;i":">",'"':""","'":"'","`":"`"},R=x.invert($),D=function(t){var e=function(e){return t[e]},r="(?:"+x.keys(t).join("|")+")",n=RegExp(r),i=RegExp(r,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(i,e):t}};x.escape=D($),x.unescape=D(R),x.result=function(t,e,r){var n=null==t?void 0:t[e];return void 0===n&&(n=r),x.isFunction(n)?n.call(t):n};var U=0;x.uniqueId=function(t){var e=++U+"";return t?t+e:e},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var L=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},z=/\\|'|\r|\n|\u2028|\u2029/g,B=function(t){return"\\"+q[t]};x.template=function(t,e,r){!e&&r&&(e=r),e=x.defaults({},e,x.templateSettings);var n=RegExp([(e.escape||L).source,(e.interpolate||L).source,(e.evaluate||L).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(n,function(e,r,n,s,u){return o+=t.slice(i,u).replace(z,B),i=u+e.length,r?o+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?o+="'+\n((__t=("+n+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var u=function(t){return s.call(this,t,x)},c=e.variable||"obj";return u.source="function("+c+"){\n"+o+"}",u},x.chain=function(t){var e=x(t);return e._chain=!0,e};var G=function(t,e){return t._chain?x(e).chain():e};x.mixin=function(t){x.each(x.functions(t),function(e){var r=x[e]=t[e];x.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),G(this,r.apply(x,t))}})},x.mixin(x),x.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=l[t];x.prototype[t]=function(){var r=this._wrapped;return e.apply(r,arguments),"shift"!==t&&"splice"!==t||0!==r.length||delete r[0],G(this,r)}}),x.each(["concat","join","slice"],function(t){var e=l[t];x.prototype[t]=function(){return G(this,e.apply(this._wrapped,arguments))}}),x.prototype.value=function(){return this._wrapped},x.prototype.valueOf=x.prototype.toJSON=x.prototype.value,x.prototype.toString=function(){return""+this._wrapped},n=[],i=function(){return x}.apply(e,n),!(void 0!==i&&(t.exports=i))}).call(this)},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";r(26),r(28),r(27),r(29),r(25),r(38),r(35),r(34),r(30),r(31),r(33),r(36),r(37),r(39),r(32);var n=r(40),i=r(41),o=r(44),s=r(43),u=r(42),c=r(46),a=r(45);n.default.bootstrap(),i.default.bootstrap(),o.default.bootstrap(),s.default.bootstrap(),u.default.bootstrap(),c.default.bootstrap(),a.default.bootstrap()}]); \ No newline at end of file diff --git a/dist/anti-redirect.user.js b/dist/anti-redirect.user.js index 92da3f8..01373e9 100644 --- a/dist/anti-redirect.user.js +++ b/dist/anti-redirect.user.js @@ -3,13 +3,15 @@ // @author axetroy // @collaborator axetroy // @description 反重定向 -// @version 2016.11.17.732 +// @version 2016.11.17.3159 // @grant GM_xmlhttpRequest // @include *www.baidu.com* // @include *www.google.* // @include *www.so.com* // @include *www.zhihu.com* // @include *daily.zhihu.com* +// @include *weibo.com* +// @include *twitter.com* // @connect * // @compatible chrome 完美运行 // @compatible firefox 完美运行 @@ -86,7 +88,7 @@ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 80); +/******/ return __webpack_require__(__webpack_require__.s = 84); /******/ }) /************************************************************************/ /******/ ([ @@ -96,7 +98,7 @@ "use strict"; "use strict"; var root_1 = __webpack_require__(2); -var toSubscriber_1 = __webpack_require__(76); +var toSubscriber_1 = __webpack_require__(80); var observable_1 = __webpack_require__(11); /** * A representation of any set of values over any amount of time. This the most basic building block @@ -236,7 +238,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var isFunction_1 = __webpack_require__(14); -var Subscription_1 = __webpack_require__(7); +var Subscription_1 = __webpack_require__(8); var Observer_1 = __webpack_require__(17); var rxSubscriber_1 = __webpack_require__(20); /** @@ -497,10 +499,94 @@ if (!exports.root) { throw new Error('RxJS could not find any global context (window, self, global)'); } //# sourceMappingURL=root.js.map -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(79))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(83))) /***/ }, /* 3 */ +/***/ function(module, exports, __webpack_require__) { + +"use strict"; +"use strict"; +var Observable_1 = __webpack_require__(0); +var config_1 = __webpack_require__(15); +var DEBUG = config_1.CONFIG.debug; +var RedirectOnUrl = (function () { + function RedirectOnUrl(domainTester, urlTester, matcher, ASelector) { + if (ASelector === void 0) { ASelector = 'a'; } + this.domainTester = domainTester; + this.urlTester = urlTester; + this.matcher = matcher; + this.ASelector = ASelector; + this.match = false; + this.DEBUG = DEBUG; + this.logCount = 0; + this.match = domainTester.test(document.domain); + } + RedirectOnUrl.prototype.handlerOneEle = function (aEle) { + var _this = this; + return Observable_1.Observable.of(aEle) + .filter(function (ele) { + return _this.urlTester.test(ele.href); + }) + .do(function (aEle) { + var matcher = _this.matcher.exec(aEle.href); + if (!matcher || !matcher.length || !matcher[1]) + return; + var url = decodeURIComponent(matcher[1]); + if (url) { + aEle.href = url; + DEBUG && (aEle.style.backgroundColor = 'green'); + } + }); + }; + RedirectOnUrl.prototype.scroll = function () { + var _this = this; + return Observable_1.Observable.fromEvent(document, 'scroll') + .debounceTime(500) + .flatMap(function () { return Observable_1.Observable.from([].slice.call(document.querySelectorAll(_this.ASelector))); }) + .subscribe(function (aEle) { + _this.handlerOneEle(aEle).subscribe(function () { + }); + }); + }; + RedirectOnUrl.prototype.mouseover = function () { + return Observable_1.Observable.fromEvent(document, 'mousemove') + .debounce(function () { return Observable_1.Observable.timer(100); }) + .map(function (event) { + var target = event.target; + return target.nodeName === 'A' ? target : target.parentNode.nodeName === 'A' ? target.parentNode : target; + }) + .filter(function (ele) { + return ele.nodeName === 'A'; + }); + }; + RedirectOnUrl.prototype.log = function (project) { + if (this.logCount < 1) { + console.log("%c Anti-Redirect %c Copyright \xa9 2015-%s %s", 'font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size:64px;color:#00bbee;-webkit-text-fill-color:#00bbee;-webkit-text-stroke: 1px #00bbee;', "font-size:12px;color:#999999;", (new Date).getFullYear(), '\n' + (project || '')); + this.logCount++; + } + }; + RedirectOnUrl.prototype.bootstrap = function () { + var _this = this; + if (!this.match) + return; + Observable_1.Observable.fromEvent(document, 'DOMContentLoaded') + .delay(300) + .subscribe(function () { + _this.scroll(); + _this.mouseover().subscribe(function (aEle) { + _this.handlerOneEle(aEle); + }); + _this.log(); + }); + }; + return RedirectOnUrl; +}()); +exports.RedirectOnUrl = RedirectOnUrl; + + +/***/ }, +/* 4 */ /***/ function(module, exports) { "use strict"; @@ -509,7 +595,7 @@ exports.isArray = Array.isArray || (function (x) { return x && typeof x.length = //# sourceMappingURL=isArray.js.map /***/ }, -/* 4 */ +/* 5 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -545,17 +631,28 @@ exports.OuterSubscriber = OuterSubscriber; //# sourceMappingURL=OuterSubscriber.js.map /***/ }, -/* 5 */ +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + +"use strict"; +"use strict"; +var AsyncAction_1 = __webpack_require__(74); +var AsyncScheduler_1 = __webpack_require__(75); +exports.async = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction); +//# sourceMappingURL=async.js.map + +/***/ }, +/* 7 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; var root_1 = __webpack_require__(2); -var isArray_1 = __webpack_require__(3); +var isArray_1 = __webpack_require__(4); var isPromise_1 = __webpack_require__(21); var Observable_1 = __webpack_require__(0); var iterator_1 = __webpack_require__(10); -var InnerSubscriber_1 = __webpack_require__(45); +var InnerSubscriber_1 = __webpack_require__(48); var observable_1 = __webpack_require__(11); function subscribeToResult(outerSubscriber, result, outerValue, outerIndex) { var destination = new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex); @@ -625,98 +722,17 @@ exports.subscribeToResult = subscribeToResult; //# sourceMappingURL=subscribeToResult.js.map /***/ }, -/* 6 */ -/***/ function(module, exports, __webpack_require__) { - -"use strict"; -"use strict"; -var Observable_1 = __webpack_require__(0); -var config_1 = __webpack_require__(15); -var DEBUG = config_1.CONFIG.debug; -var RedirectOnUrl = (function () { - function RedirectOnUrl(domainTester, urlTester, matcher, ASelector) { - if (ASelector === void 0) { ASelector = 'a'; } - this.domainTester = domainTester; - this.urlTester = urlTester; - this.matcher = matcher; - this.ASelector = ASelector; - this.match = false; - this.match = domainTester.test(document.domain); - } - RedirectOnUrl.prototype.handlerOneEle = function (aEle) { - var _this = this; - return Observable_1.Observable.of(aEle) - .filter(function (ele) { - return _this.urlTester.test(ele.href); - }) - .do(function (aEle) { - var matcher = _this.matcher.exec(aEle.href); - if (!matcher || !matcher.length || !matcher[1]) - return; - var url = decodeURIComponent(matcher[1]); - if (url) { - aEle.href = url; - DEBUG && (aEle.style.backgroundColor = 'green'); - } - }); - }; - RedirectOnUrl.prototype.scroll = function () { - var _this = this; - return Observable_1.Observable.fromEvent(document, 'mousemove') - .debounce(function () { return Observable_1.Observable.timer(500); }) - .flatMap(function () { return Observable_1.Observable.from([].slice.call(document.querySelectorAll(_this.ASelector))); }) - .do(function (aEle) { - _this.handlerOneEle(aEle).subscribe(function () { - }); - }); - }; - RedirectOnUrl.prototype.mouseover = function () { - var _this = this; - return Observable_1.Observable.fromEvent(document, 'mousemove') - .throttle(function () { return Observable_1.Observable.timer(100); }) - .map(function (event) { - var target = event.target; - return target.nodeName === 'A' ? target : target.parentNode.nodeName === 'A' ? target.parentNode : target; - }) - .filter(function (ele) { - return ele.nodeName === 'A'; - }) - .flatMap(function (aEle) { return _this.handlerOneEle(aEle); }); - }; - RedirectOnUrl.prototype.log = function (str) { - console.log(str || 'boostrap anti-redirect'); - }; - RedirectOnUrl.prototype.bootstrap = function () { - var _this = this; - if (!this.match) - return; - Observable_1.Observable.fromEvent(document, 'DOMContentLoaded') - .flatMap(function () { return Observable_1.Observable.timer(1000); }) - .subscribe(function () { - _this.log(); - _this.scroll().subscribe(function () { - }); - _this.mouseover().subscribe(function () { - }); - }); - }; - return RedirectOnUrl; -}()); -exports.RedirectOnUrl = RedirectOnUrl; - - -/***/ }, -/* 7 */ +/* 8 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; -var isArray_1 = __webpack_require__(3); -var isObject_1 = __webpack_require__(75); +var isArray_1 = __webpack_require__(4); +var isObject_1 = __webpack_require__(79); var isFunction_1 = __webpack_require__(14); var tryCatch_1 = __webpack_require__(23); var errorObject_1 = __webpack_require__(12); -var UnsubscriptionError_1 = __webpack_require__(73); +var UnsubscriptionError_1 = __webpack_require__(77); /** * Represents a disposable resource, such as the execution of an Observable. A * Subscription has one important method, `unsubscribe`, that takes no argument @@ -865,7 +881,7 @@ exports.Subscription = Subscription; //# sourceMappingURL=Subscription.js.map /***/ }, -/* 8 */ +/* 9 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -945,17 +961,6 @@ var EmptyObservable = (function (_super) { exports.EmptyObservable = EmptyObservable; //# sourceMappingURL=EmptyObservable.js.map -/***/ }, -/* 9 */ -/***/ function(module, exports, __webpack_require__) { - -"use strict"; -"use strict"; -var AsyncAction_1 = __webpack_require__(70); -var AsyncScheduler_1 = __webpack_require__(71); -exports.async = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction); -//# sourceMappingURL=async.js.map - /***/ }, /* 10 */ /***/ function(module, exports, __webpack_require__) { @@ -1233,7 +1238,7 @@ var __extends = (this && this.__extends) || function (d, b) { }; var Observable_1 = __webpack_require__(0); var ScalarObservable_1 = __webpack_require__(19); -var EmptyObservable_1 = __webpack_require__(8); +var EmptyObservable_1 = __webpack_require__(9); var isScheduler_1 = __webpack_require__(22); /** * We need this JSDoc comment for affecting ESDoc. @@ -1479,7 +1484,7 @@ exports.tryCatch = tryCatch; "use strict"; "use strict"; -var _ = __webpack_require__(78); +var _ = __webpack_require__(82); var Observable_1 = __webpack_require__(0); var Http = (function () { function Http(options) { @@ -1540,7 +1545,7 @@ exports.http = http; "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var forkJoin_1 = __webpack_require__(54); +var forkJoin_1 = __webpack_require__(57); Observable_1.Observable.forkJoin = forkJoin_1.forkJoin; //# sourceMappingURL=forkJoin.js.map @@ -1551,7 +1556,7 @@ Observable_1.Observable.forkJoin = forkJoin_1.forkJoin; "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var from_1 = __webpack_require__(55); +var from_1 = __webpack_require__(58); Observable_1.Observable.from = from_1.from; //# sourceMappingURL=from.js.map @@ -1562,7 +1567,7 @@ Observable_1.Observable.from = from_1.from; "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var fromEvent_1 = __webpack_require__(56); +var fromEvent_1 = __webpack_require__(59); Observable_1.Observable.fromEvent = fromEvent_1.fromEvent; //# sourceMappingURL=fromEvent.js.map @@ -1573,7 +1578,7 @@ Observable_1.Observable.fromEvent = fromEvent_1.fromEvent; "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var of_1 = __webpack_require__(57); +var of_1 = __webpack_require__(60); Observable_1.Observable.of = of_1.of; //# sourceMappingURL=of.js.map @@ -1584,7 +1589,7 @@ Observable_1.Observable.of = of_1.of; "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var timer_1 = __webpack_require__(58); +var timer_1 = __webpack_require__(61); Observable_1.Observable.timer = timer_1.timer; //# sourceMappingURL=timer.js.map @@ -1595,7 +1600,7 @@ Observable_1.Observable.timer = timer_1.timer; "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var debounce_1 = __webpack_require__(59); +var debounce_1 = __webpack_require__(62); Observable_1.Observable.prototype.debounce = debounce_1.debounce; //# sourceMappingURL=debounce.js.map @@ -1606,91 +1611,102 @@ Observable_1.Observable.prototype.debounce = debounce_1.debounce; "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var delay_1 = __webpack_require__(60); +var debounceTime_1 = __webpack_require__(63); +Observable_1.Observable.prototype.debounceTime = debounceTime_1.debounceTime; +//# sourceMappingURL=debounceTime.js.map + +/***/ }, +/* 32 */ +/***/ function(module, exports, __webpack_require__) { + +"use strict"; +"use strict"; +var Observable_1 = __webpack_require__(0); +var delay_1 = __webpack_require__(64); Observable_1.Observable.prototype.delay = delay_1.delay; //# sourceMappingURL=delay.js.map /***/ }, -/* 32 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var do_1 = __webpack_require__(61); +var do_1 = __webpack_require__(65); Observable_1.Observable.prototype.do = do_1._do; Observable_1.Observable.prototype._do = do_1._do; //# sourceMappingURL=do.js.map /***/ }, -/* 33 */ +/* 34 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var filter_1 = __webpack_require__(62); +var filter_1 = __webpack_require__(66); Observable_1.Observable.prototype.filter = filter_1.filter; //# sourceMappingURL=filter.js.map /***/ }, -/* 34 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var map_1 = __webpack_require__(63); +var map_1 = __webpack_require__(67); Observable_1.Observable.prototype.map = map_1.map; //# sourceMappingURL=map.js.map /***/ }, -/* 35 */ +/* 36 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var mergeMap_1 = __webpack_require__(64); +var mergeMap_1 = __webpack_require__(68); Observable_1.Observable.prototype.mergeMap = mergeMap_1.mergeMap; Observable_1.Observable.prototype.flatMap = mergeMap_1.mergeMap; //# sourceMappingURL=mergeMap.js.map /***/ }, -/* 36 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var retry_1 = __webpack_require__(66); +var retry_1 = __webpack_require__(70); Observable_1.Observable.prototype.retry = retry_1.retry; //# sourceMappingURL=retry.js.map /***/ }, -/* 37 */ +/* 38 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var throttle_1 = __webpack_require__(67); +var throttle_1 = __webpack_require__(71); Observable_1.Observable.prototype.throttle = throttle_1.throttle; //# sourceMappingURL=throttle.js.map /***/ }, -/* 38 */ +/* 39 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; var Observable_1 = __webpack_require__(0); -var timeout_1 = __webpack_require__(68); +var timeout_1 = __webpack_require__(72); Observable_1.Observable.prototype.timeout = timeout_1.timeout; //# sourceMappingURL=timeout.js.map /***/ }, -/* 39 */ +/* 40 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -1702,10 +1718,37 @@ var __extends = (this && this.__extends) || function (d, b) { }; var Observable_1 = __webpack_require__(0); var http_1 = __webpack_require__(24); -var redirect_on_request_1 = __webpack_require__(77); +var redirect_on_request_1 = __webpack_require__(81); function getText(htmlElement) { return htmlElement.innerText || htmlElement.textContent; } +var Query = (function () { + function Query(queryStr) { + this.queryStr = queryStr; + this.object = {}; + this.object = this.toObject(queryStr.replace(/^\?+/, '')); + } + Query.prototype.toObject = function (queryStr) { + var obj = {}; + queryStr.split('&').forEach(function (item) { + var arr = item.split('=') || []; + var key = arr[0] || ''; + obj[key] = arr[1] || ''; + }); + return obj; + }; + Query.prototype.toString = function () { + var arr = []; + for (var key in this.object) { + if (this.object.hasOwnProperty(key)) { + var value = this.object[key]; + arr.push(key + '=' + value); + } + } + return '?' + arr.join('&'); + }; + return Query; +}()); var BaiduRedirect = (function (_super) { __extends(BaiduRedirect, _super); function BaiduRedirect(domainTester, urlTester, matcher, ASelector) { @@ -1714,14 +1757,14 @@ var BaiduRedirect = (function (_super) { } BaiduRedirect.prototype.handlerAll = function () { var _this = this; - var skipArray = location.search.match(/pn=(\d+)/) || ['']; - var skip = skipArray.length === 2 ? +skipArray[1] : 0; - var href = window.top.location.href; - if (!/www\.baidu\.com\/s/.test(href)) + if (!/www\.baidu\.com\/s/.test(window.top.location.href)) return; - var url = href.replace(/(\&)(tn=\w+)(\&)/img, '$1' + 'tn=baidulocal' + '$3') + ("×tamp=" + new Date().getTime()); - if (url.indexOf('tn=baidulocal') === -1) - url += '&tn=baidulocal'; + var query = new Query(window.top.location.search); + var skip = query.object.pn || 0; + query.object.tn = 'baidulocal'; + query.object.timestamp = new Date().getTime(); + query.object.rn = 50; + var url = location.protocol + "://" + (location.host + location.pathname + query); Observable_1.Observable.forkJoin(http_1.http.get(url), http_1.http.get(url.replace(/pn=(\d+)/, "pn=" + (skip + 10)))).retry(2) .timeout(http_1.timeout) .subscribe(function (resList) { @@ -1754,9 +1797,6 @@ var BaiduRedirect = (function (_super) { }); }); }; - BaiduRedirect.prototype.log = function () { - console.log('bootstrap baidu'); - }; return BaiduRedirect; }(redirect_on_request_1.RedirectOnRequest)); Object.defineProperty(exports, "__esModule", { value: true }); @@ -1764,7 +1804,7 @@ exports.default = new BaiduRedirect(/www\.baidu\.com/, /www\.baidu\.com\/link\?u /***/ }, -/* 40 */ +/* 41 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -1777,7 +1817,7 @@ var __extends = (this && this.__extends) || function (d, b) { var Observable_1 = __webpack_require__(0); var config_1 = __webpack_require__(15); var DEBUG = config_1.CONFIG.debug; -var redirect_on_url_1 = __webpack_require__(6); +var redirect_on_url_1 = __webpack_require__(3); var GoogleRedirect = (function (_super) { __extends(GoogleRedirect, _super); function GoogleRedirect(domainTester, urlTester, matcher) { @@ -1796,9 +1836,6 @@ var GoogleRedirect = (function (_super) { } }); }; - GoogleRedirect.prototype.log = function () { - console.log('bootstrap google'); - }; return GoogleRedirect; }(redirect_on_url_1.RedirectOnUrl)); Object.defineProperty(exports, "__esModule", { value: true }); @@ -1806,7 +1843,7 @@ exports.default = new GoogleRedirect(/www\.google\./, null, null); /***/ }, -/* 41 */ +/* 42 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -1816,15 +1853,12 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var redirect_on_url_1 = __webpack_require__(6); +var redirect_on_url_1 = __webpack_require__(3); var SoRedirect = (function (_super) { __extends(SoRedirect, _super); function SoRedirect(domainTester, urlTester, matcher) { return _super.call(this, domainTester, urlTester, matcher) || this; } - SoRedirect.prototype.log = function () { - console.log('bootstrap 360 so'); - }; return SoRedirect; }(redirect_on_url_1.RedirectOnUrl)); Object.defineProperty(exports, "__esModule", { value: true }); @@ -1832,7 +1866,83 @@ exports.default = new SoRedirect(/www\.so\.com/, /so\.com\/link\?url=/, /so\.com /***/ }, -/* 42 */ +/* 43 */ +/***/ function(module, exports, __webpack_require__) { + +"use strict"; +"use strict"; +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var Observable_1 = __webpack_require__(0); +var redirect_on_url_1 = __webpack_require__(3); +var TwitterRedirect = (function (_super) { + __extends(TwitterRedirect, _super); + function TwitterRedirect(domainTester, urlTester, matcher) { + return _super.call(this, domainTester, urlTester, matcher) || this; + } + TwitterRedirect.prototype.handlerOneEle = function (aEle) { + var _this = this; + return Observable_1.Observable.of(aEle) + .filter(function (ele) { + return _this.urlTester.test(ele.href) && /^https?:\/\//.test(ele.title); + }) + .do(function (aEle) { + var url = decodeURIComponent(aEle.title); + if (url) { + aEle.href = url; + _this.DEBUG && (aEle.style.backgroundColor = 'green'); + } + }); + }; + return TwitterRedirect; +}(redirect_on_url_1.RedirectOnUrl)); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = new TwitterRedirect(/twitter\.com/, /t\.co\/\w+/, null); + + +/***/ }, +/* 44 */ +/***/ function(module, exports, __webpack_require__) { + +"use strict"; +"use strict"; +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var Observable_1 = __webpack_require__(0); +var redirect_on_url_1 = __webpack_require__(3); +var WeiboRedirect = (function (_super) { + __extends(WeiboRedirect, _super); + function WeiboRedirect(domainTester, urlTester, matcher) { + return _super.call(this, domainTester, urlTester, matcher) || this; + } + WeiboRedirect.prototype.handlerOneEle = function (aEle) { + var _this = this; + return Observable_1.Observable.of(aEle) + .filter(function (ele) { + return _this.urlTester.test(ele.href) && /^https?:\/\//.test(ele.title); + }) + .do(function (aEle) { + var url = decodeURIComponent(aEle.title); + if (url) { + aEle.href = url; + _this.DEBUG && (aEle.style.backgroundColor = 'green'); + } + }); + }; + return WeiboRedirect; +}(redirect_on_url_1.RedirectOnUrl)); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = new WeiboRedirect(/weibo\.com/, /t\.cn\/\w+/, null); + + +/***/ }, +/* 45 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -1842,15 +1952,12 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var redirect_on_url_1 = __webpack_require__(6); +var redirect_on_url_1 = __webpack_require__(3); var ZhihuDailyRedirect = (function (_super) { __extends(ZhihuDailyRedirect, _super); function ZhihuDailyRedirect(domainTester, urlTester, matcher) { return _super.call(this, domainTester, urlTester, matcher) || this; } - ZhihuDailyRedirect.prototype.log = function () { - console.log('bootstrap zhihu daily'); - }; return ZhihuDailyRedirect; }(redirect_on_url_1.RedirectOnUrl)); Object.defineProperty(exports, "__esModule", { value: true }); @@ -1858,7 +1965,7 @@ exports.default = new ZhihuDailyRedirect(/daily\.zhihu\.com/, /zhihu\.com\/\?tar /***/ }, -/* 43 */ +/* 46 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -1868,15 +1975,12 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var redirect_on_url_1 = __webpack_require__(6); +var redirect_on_url_1 = __webpack_require__(3); var ZhihuRedirect = (function (_super) { __extends(ZhihuRedirect, _super); function ZhihuRedirect(domainTester, urlTester, matcher) { return _super.call(this, domainTester, urlTester, matcher) || this; } - ZhihuRedirect.prototype.log = function () { - console.log('bootstrap zhihu'); - }; return ZhihuRedirect; }(redirect_on_url_1.RedirectOnUrl)); Object.defineProperty(exports, "__esModule", { value: true }); @@ -1884,7 +1988,7 @@ exports.default = new ZhihuRedirect(/www\.zhihu\.com/, /zhihu\.com\/\?target=/, /***/ }, -/* 44 */ +/* 47 */ /***/ function(module, exports, __webpack_require__) { /*! @@ -1895,7 +1999,7 @@ exports.default = new ZhihuRedirect(/www\.zhihu\.com/, /zhihu\.com\/\?target=/, !function(t,e){ true?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.inView=e():t.inView=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=n(2),o=r(i);t.exports=o["default"]},function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),o=r(i),u=n(3),f=r(u),s=n(4),c=function(){if("undefined"!=typeof window){var t=100,e=["scroll","resize","load"],n={history:[]},r={offset:{},threshold:0,test:s.inViewport},i=(0,o["default"])(function(){n.history.forEach(function(t){n[t].check()})},t);e.forEach(function(t){return addEventListener(t,i)}),window.MutationObserver&&new MutationObserver(i).observe(document.body,{attributes:!0,childList:!0,subtree:!0});var u=function(t){if("string"==typeof t){var e=[].slice.call(document.querySelectorAll(t));return n.history.indexOf(t)>-1?n[t].elements=e:(n[t]=(0,f["default"])(e,r),n.history.push(t)),n[t]}};return u.offset=function(t){if(void 0===t)return r.offset;var e=function(t){return"number"==typeof t};return["top","right","bottom","left"].forEach(e(t)?function(e){return r.offset[e]=t}:function(n){return e(t[n])?r.offset[n]=t[n]:null}),r.offset},u.threshold=function(t){return"number"==typeof t&&t>=0&&t<=1?r.threshold=t:r.threshold},u.test=function(t){return"function"==typeof t?r.test=t:r.test},u.is=function(t){return r.test(t,r)},u.offset(0),u}};e["default"]=c()},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n-1,o=n&&!i,u=!n&&i;o&&(t.current.push(e),t.emit("enter",e)),u&&(t.current.splice(r,1),t.emit("exit",e))}),this}},{key:"on",value:function(t,e){return this.handlers[t].push(e),this}},{key:"once",value:function(t,e){return this.singles[t].unshift(e),this}},{key:"emit",value:function(t,e){for(;this.singles[t].length;)this.singles[t].pop()(e);for(var n=this.handlers[t].length;--n>-1;)this.handlers[t][n](e);return this}}]),t}();e["default"]=function(t,e){return new i(t,e)}},function(t,e){"use strict";function n(t,e){var n=t.getBoundingClientRect(),r=n.top,i=n.right,o=n.bottom,u=n.left,f=n.width,s=n.height,c={t:o,r:window.innerWidth-u,b:window.innerHeight-r,l:i},a={x:e.threshold*f,y:e.threshold*s};return c.t>e.offset.top+a.y&&c.r>e.offset.right+a.x&&c.b>e.offset.bottom+a.y&&c.l>e.offset.left+a.x}Object.defineProperty(e,"__esModule",{value:!0}),e.inViewport=n},function(t,e){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(e,function(){return this}())},function(t,e,n){var r=n(5),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){function r(t,e,n){function r(e){var n=x,r=m;return x=m=void 0,E=e,w=t.apply(r,n)}function a(t){return E=t,j=setTimeout(h,e),_?r(t):w}function l(t){var n=t-O,r=t-E,i=e-n;return M?c(i,g-r):i}function d(t){var n=t-O,r=t-E;return void 0===O||n>=e||n<0||M&&r>=g}function h(){var t=o();return d(t)?p(t):void(j=setTimeout(h,l(t)))}function p(t){return j=void 0,T&&x?r(t):(x=m=void 0,w)}function v(){void 0!==j&&clearTimeout(j),E=0,x=O=m=j=void 0}function y(){return void 0===j?w:p(o())}function b(){var t=o(),n=d(t);if(x=arguments,m=this,O=t,n){if(void 0===j)return a(O);if(M)return j=setTimeout(h,e),r(O)}return void 0===j&&(j=setTimeout(h,e)),w}var x,m,g,w,j,O,E=0,_=!1,M=!1,T=!0;if("function"!=typeof t)throw new TypeError(f);return e=u(e)||0,i(n)&&(_=!!n.leading,M="maxWait"in n,g=M?s(u(n.maxWait)||0,e):g,T="trailing"in n?!!n.trailing:T),b.cancel=v,b.flush=y,b}var i=n(1),o=n(8),u=n(10),f="Expected a function",s=Math.max,c=Math.min;t.exports=r},function(t,e,n){var r=n(6),i=function(){return r.Date.now()};t.exports=i},function(t,e,n){function r(t,e,n){var r=!0,f=!0;if("function"!=typeof t)throw new TypeError(u);return o(n)&&(r="leading"in n?!!n.leading:r,f="trailing"in n?!!n.trailing:f),i(t,e,{leading:r,maxWait:e,trailing:f})}var i=n(7),o=n(1),u="Expected a function";t.exports=r},function(t,e){function n(t){return t}t.exports=n}])}); /***/ }, -/* 45 */ +/* 48 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -1937,7 +2041,7 @@ exports.InnerSubscriber = InnerSubscriber; //# sourceMappingURL=InnerSubscriber.js.map /***/ }, -/* 46 */ +/* 49 */ /***/ function(module, exports) { "use strict"; @@ -1992,7 +2096,7 @@ exports.Scheduler = Scheduler; //# sourceMappingURL=Scheduler.js.map /***/ }, -/* 47 */ +/* 50 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -2004,7 +2108,7 @@ var __extends = (this && this.__extends) || function (d, b) { }; var Observable_1 = __webpack_require__(0); var ScalarObservable_1 = __webpack_require__(19); -var EmptyObservable_1 = __webpack_require__(8); +var EmptyObservable_1 = __webpack_require__(9); /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} @@ -2068,7 +2172,7 @@ exports.ArrayLikeObservable = ArrayLikeObservable; //# sourceMappingURL=ArrayLikeObservable.js.map /***/ }, -/* 48 */ +/* 51 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -2079,10 +2183,10 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Observable_1 = __webpack_require__(0); -var EmptyObservable_1 = __webpack_require__(8); -var isArray_1 = __webpack_require__(3); -var subscribeToResult_1 = __webpack_require__(5); -var OuterSubscriber_1 = __webpack_require__(4); +var EmptyObservable_1 = __webpack_require__(9); +var isArray_1 = __webpack_require__(4); +var subscribeToResult_1 = __webpack_require__(7); +var OuterSubscriber_1 = __webpack_require__(5); /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} @@ -2186,7 +2290,7 @@ var ForkJoinSubscriber = (function (_super) { //# sourceMappingURL=ForkJoinObservable.js.map /***/ }, -/* 49 */ +/* 52 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -2200,7 +2304,7 @@ var Observable_1 = __webpack_require__(0); var tryCatch_1 = __webpack_require__(23); var isFunction_1 = __webpack_require__(14); var errorObject_1 = __webpack_require__(12); -var Subscription_1 = __webpack_require__(7); +var Subscription_1 = __webpack_require__(8); function isNodeStyleEventEmmitter(sourceObj) { return !!sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function'; } @@ -2327,7 +2431,7 @@ exports.FromEventObservable = FromEventObservable; //# sourceMappingURL=FromEventObservable.js.map /***/ }, -/* 50 */ +/* 53 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -2337,15 +2441,15 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var isArray_1 = __webpack_require__(3); +var isArray_1 = __webpack_require__(4); var isPromise_1 = __webpack_require__(21); -var PromiseObservable_1 = __webpack_require__(52); -var IteratorObservable_1 = __webpack_require__(51); +var PromiseObservable_1 = __webpack_require__(55); +var IteratorObservable_1 = __webpack_require__(54); var ArrayObservable_1 = __webpack_require__(18); -var ArrayLikeObservable_1 = __webpack_require__(47); +var ArrayLikeObservable_1 = __webpack_require__(50); var iterator_1 = __webpack_require__(10); var Observable_1 = __webpack_require__(0); -var observeOn_1 = __webpack_require__(65); +var observeOn_1 = __webpack_require__(69); var observable_1 = __webpack_require__(11); var isArrayLike = (function (x) { return x && typeof x.length === 'number'; }); /** @@ -2449,7 +2553,7 @@ exports.FromObservable = FromObservable; //# sourceMappingURL=FromObservable.js.map /***/ }, -/* 51 */ +/* 54 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -2618,7 +2722,7 @@ function sign(value) { //# sourceMappingURL=IteratorObservable.js.map /***/ }, -/* 52 */ +/* 55 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -2745,7 +2849,7 @@ function dispatchError(arg) { //# sourceMappingURL=PromiseObservable.js.map /***/ }, -/* 53 */ +/* 56 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -2755,9 +2859,9 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var isNumeric_1 = __webpack_require__(74); +var isNumeric_1 = __webpack_require__(78); var Observable_1 = __webpack_require__(0); -var async_1 = __webpack_require__(9); +var async_1 = __webpack_require__(6); var isScheduler_1 = __webpack_require__(22); var isDate_1 = __webpack_require__(13); /** @@ -2858,37 +2962,37 @@ exports.TimerObservable = TimerObservable; //# sourceMappingURL=TimerObservable.js.map /***/ }, -/* 54 */ +/* 57 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; -var ForkJoinObservable_1 = __webpack_require__(48); +var ForkJoinObservable_1 = __webpack_require__(51); exports.forkJoin = ForkJoinObservable_1.ForkJoinObservable.create; //# sourceMappingURL=forkJoin.js.map /***/ }, -/* 55 */ +/* 58 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; -var FromObservable_1 = __webpack_require__(50); +var FromObservable_1 = __webpack_require__(53); exports.from = FromObservable_1.FromObservable.create; //# sourceMappingURL=from.js.map /***/ }, -/* 56 */ +/* 59 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; -var FromEventObservable_1 = __webpack_require__(49); +var FromEventObservable_1 = __webpack_require__(52); exports.fromEvent = FromEventObservable_1.FromEventObservable.create; //# sourceMappingURL=fromEvent.js.map /***/ }, -/* 57 */ +/* 60 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -2898,17 +3002,17 @@ exports.of = ArrayObservable_1.ArrayObservable.of; //# sourceMappingURL=of.js.map /***/ }, -/* 58 */ +/* 61 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; -var TimerObservable_1 = __webpack_require__(53); +var TimerObservable_1 = __webpack_require__(56); exports.timer = TimerObservable_1.TimerObservable.create; //# sourceMappingURL=timer.js.map /***/ }, -/* 59 */ +/* 62 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -2918,8 +3022,8 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var OuterSubscriber_1 = __webpack_require__(4); -var subscribeToResult_1 = __webpack_require__(5); +var OuterSubscriber_1 = __webpack_require__(5); +var subscribeToResult_1 = __webpack_require__(7); /** * Emits a value from the source Observable only after a particular time span * determined by another Observable has passed without another source emission. @@ -3041,7 +3145,7 @@ var DebounceSubscriber = (function (_super) { //# sourceMappingURL=debounce.js.map /***/ }, -/* 60 */ +/* 63 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -3051,7 +3155,129 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var async_1 = __webpack_require__(9); +var Subscriber_1 = __webpack_require__(1); +var async_1 = __webpack_require__(6); +/** + * Emits a value from the source Observable only after a particular time span + * has passed without another source emission. + * + * It's like {@link delay}, but passes only the most + * recent value from each burst of emissions. + * + * + * + * `debounceTime` delays values emitted by the source Observable, but drops + * previous pending delayed emissions if a new value arrives on the source + * Observable. This operator keeps track of the most recent value from the + * source Observable, and emits that only when `dueTime` enough time has passed + * without any other value appearing on the source Observable. If a new value + * appears before `dueTime` silence occurs, the previous value will be dropped + * and will not be emitted on the output Observable. + * + * This is a rate-limiting operator, because it is impossible for more than one + * value to be emitted in any time window of duration `dueTime`, but it is also + * a delay-like operator since output emissions do not occur at the same time as + * they did on the source Observable. Optionally takes a {@link Scheduler} for + * managing timers. + * + * @example Emit the most recent click after a burst of clicks + * var clicks = Rx.Observable.fromEvent(document, 'click'); + * var result = clicks.debounceTime(1000); + * result.subscribe(x => console.log(x)); + * + * @see {@link auditTime} + * @see {@link debounce} + * @see {@link delay} + * @see {@link sampleTime} + * @see {@link throttleTime} + * + * @param {number} dueTime The timeout duration in milliseconds (or the time + * unit determined internally by the optional `scheduler`) for the window of + * time required to wait for emission silence before emitting the most recent + * source value. + * @param {Scheduler} [scheduler=async] The {@link Scheduler} to use for + * managing the timers that handle the timeout for each value. + * @return {Observable} An Observable that delays the emissions of the source + * Observable by the specified `dueTime`, and may drop some values if they occur + * too frequently. + * @method debounceTime + * @owner Observable + */ +function debounceTime(dueTime, scheduler) { + if (scheduler === void 0) { scheduler = async_1.async; } + return this.lift(new DebounceTimeOperator(dueTime, scheduler)); +} +exports.debounceTime = debounceTime; +var DebounceTimeOperator = (function () { + function DebounceTimeOperator(dueTime, scheduler) { + this.dueTime = dueTime; + this.scheduler = scheduler; + } + DebounceTimeOperator.prototype.call = function (subscriber, source) { + return source._subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler)); + }; + return DebounceTimeOperator; +}()); +/** + * We need this JSDoc comment for affecting ESDoc. + * @ignore + * @extends {Ignored} + */ +var DebounceTimeSubscriber = (function (_super) { + __extends(DebounceTimeSubscriber, _super); + function DebounceTimeSubscriber(destination, dueTime, scheduler) { + _super.call(this, destination); + this.dueTime = dueTime; + this.scheduler = scheduler; + this.debouncedSubscription = null; + this.lastValue = null; + this.hasValue = false; + } + DebounceTimeSubscriber.prototype._next = function (value) { + this.clearDebounce(); + this.lastValue = value; + this.hasValue = true; + this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this)); + }; + DebounceTimeSubscriber.prototype._complete = function () { + this.debouncedNext(); + this.destination.complete(); + }; + DebounceTimeSubscriber.prototype.debouncedNext = function () { + this.clearDebounce(); + if (this.hasValue) { + this.destination.next(this.lastValue); + this.lastValue = null; + this.hasValue = false; + } + }; + DebounceTimeSubscriber.prototype.clearDebounce = function () { + var debouncedSubscription = this.debouncedSubscription; + if (debouncedSubscription !== null) { + this.remove(debouncedSubscription); + debouncedSubscription.unsubscribe(); + this.debouncedSubscription = null; + } + }; + return DebounceTimeSubscriber; +}(Subscriber_1.Subscriber)); +function dispatchNext(subscriber) { + subscriber.debouncedNext(); +} +//# sourceMappingURL=debounceTime.js.map + +/***/ }, +/* 64 */ +/***/ function(module, exports, __webpack_require__) { + +"use strict"; +"use strict"; +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var async_1 = __webpack_require__(6); var isDate_1 = __webpack_require__(13); var Subscriber_1 = __webpack_require__(1); var Notification_1 = __webpack_require__(16); @@ -3182,7 +3408,7 @@ var DelayMessage = (function () { //# sourceMappingURL=delay.js.map /***/ }, -/* 61 */ +/* 65 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -3258,7 +3484,7 @@ var DoSubscriber = (function (_super) { //# sourceMappingURL=do.js.map /***/ }, -/* 62 */ +/* 66 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -3318,7 +3544,7 @@ var FilterSubscriber = (function (_super) { //# sourceMappingURL=filter.js.map /***/ }, -/* 63 */ +/* 67 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -3411,7 +3637,7 @@ var MapSubscriber = (function (_super) { //# sourceMappingURL=map.js.map /***/ }, -/* 64 */ +/* 68 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -3421,8 +3647,8 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var subscribeToResult_1 = __webpack_require__(5); -var OuterSubscriber_1 = __webpack_require__(4); +var subscribeToResult_1 = __webpack_require__(7); +var OuterSubscriber_1 = __webpack_require__(5); /* tslint:disable:max-line-length */ function mergeMap(project, resultSelector, concurrent) { if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } @@ -3530,7 +3756,7 @@ exports.MergeMapSubscriber = MergeMapSubscriber; //# sourceMappingURL=mergeMap.js.map /***/ }, -/* 65 */ +/* 69 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -3611,7 +3837,7 @@ exports.ObserveOnMessage = ObserveOnMessage; //# sourceMappingURL=observeOn.js.map /***/ }, -/* 66 */ +/* 70 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -3686,7 +3912,7 @@ var RetrySubscriber = (function (_super) { //# sourceMappingURL=retry.js.map /***/ }, -/* 67 */ +/* 71 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -3696,8 +3922,8 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var OuterSubscriber_1 = __webpack_require__(4); -var subscribeToResult_1 = __webpack_require__(5); +var OuterSubscriber_1 = __webpack_require__(5); +var subscribeToResult_1 = __webpack_require__(7); /** * Emits a value from the source Observable, then ignores subsequent source * values for a duration determined by another Observable, then repeats this @@ -3800,7 +4026,7 @@ var ThrottleSubscriber = (function (_super) { //# sourceMappingURL=throttle.js.map /***/ }, -/* 68 */ +/* 72 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -3810,10 +4036,10 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var async_1 = __webpack_require__(9); +var async_1 = __webpack_require__(6); var isDate_1 = __webpack_require__(13); var Subscriber_1 = __webpack_require__(1); -var TimeoutError_1 = __webpack_require__(72); +var TimeoutError_1 = __webpack_require__(76); /** * @param due * @param errorToSend @@ -3909,7 +4135,7 @@ var TimeoutSubscriber = (function (_super) { //# sourceMappingURL=timeout.js.map /***/ }, -/* 69 */ +/* 73 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -3919,7 +4145,7 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var Subscription_1 = __webpack_require__(7); +var Subscription_1 = __webpack_require__(8); /** * A unit of work to be executed in a {@link Scheduler}. An action is typically * created from within a Scheduler and an RxJS user does not need to concern @@ -3959,7 +4185,7 @@ exports.Action = Action; //# sourceMappingURL=Action.js.map /***/ }, -/* 70 */ +/* 74 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -3970,7 +4196,7 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var root_1 = __webpack_require__(2); -var Action_1 = __webpack_require__(69); +var Action_1 = __webpack_require__(73); /** * We need this JSDoc comment for affecting ESDoc. * @ignore @@ -4107,7 +4333,7 @@ exports.AsyncAction = AsyncAction; //# sourceMappingURL=AsyncAction.js.map /***/ }, -/* 71 */ +/* 75 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -4117,7 +4343,7 @@ var __extends = (this && this.__extends) || function (d, b) { function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; -var Scheduler_1 = __webpack_require__(46); +var Scheduler_1 = __webpack_require__(49); var AsyncScheduler = (function (_super) { __extends(AsyncScheduler, _super); function AsyncScheduler() { @@ -4164,7 +4390,7 @@ exports.AsyncScheduler = AsyncScheduler; //# sourceMappingURL=AsyncScheduler.js.map /***/ }, -/* 72 */ +/* 76 */ /***/ function(module, exports) { "use strict"; @@ -4195,7 +4421,7 @@ exports.TimeoutError = TimeoutError; //# sourceMappingURL=TimeoutError.js.map /***/ }, -/* 73 */ +/* 77 */ /***/ function(module, exports) { "use strict"; @@ -4226,12 +4452,12 @@ exports.UnsubscriptionError = UnsubscriptionError; //# sourceMappingURL=UnsubscriptionError.js.map /***/ }, -/* 74 */ +/* 78 */ /***/ function(module, exports, __webpack_require__) { "use strict"; "use strict"; -var isArray_1 = __webpack_require__(3); +var isArray_1 = __webpack_require__(4); function isNumeric(val) { // parseFloat NaNs numeric-cast false positives (null|true|false|"") // ...but misinterprets leading-number strings, particularly hex literals ("0x...") @@ -4244,7 +4470,7 @@ exports.isNumeric = isNumeric; //# sourceMappingURL=isNumeric.js.map /***/ }, -/* 75 */ +/* 79 */ /***/ function(module, exports) { "use strict"; @@ -4256,7 +4482,7 @@ exports.isObject = isObject; //# sourceMappingURL=isObject.js.map /***/ }, -/* 76 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -4282,7 +4508,7 @@ exports.toSubscriber = toSubscriber; //# sourceMappingURL=toSubscriber.js.map /***/ }, -/* 77 */ +/* 81 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -4305,6 +4531,7 @@ var RedirectOnRequest = (function () { this.ASelector = ASelector; this.DEBUG = DEBUG; this.status = status; + this.logCount = 0; this.match = domainTester.test(document.domain); } RedirectOnRequest.prototype.handlerOneEle = function (aElement) { @@ -4373,8 +4600,11 @@ var RedirectOnRequest = (function () { }) .filter(function (ele) { return ele.nodeName === 'A'; }); }; - RedirectOnRequest.prototype.log = function (str) { - console.log(str || 'boostrap anti-redirect'); + RedirectOnRequest.prototype.log = function (project) { + if (this.logCount < 1) { + console.log("%c Anti-Redirect %c Copyright \xa9 2015-%s %s", 'font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size:64px;color:#00bbee;-webkit-text-fill-color:#00bbee;-webkit-text-stroke: 1px #00bbee;', "font-size:12px;color:#999999;", (new Date).getFullYear(), '\n' + (project || '')); + this.logCount++; + } }; RedirectOnRequest.prototype.bootstrap = function () { var _this = this; @@ -4383,7 +4613,7 @@ var RedirectOnRequest = (function () { Observable_1.Observable.fromEvent(document, 'DOMContentLoaded') .delay(500) .do(function () { - inview = __webpack_require__(44); + inview = __webpack_require__(47); inview('#content_left a').on('enter', function (aEle) { _this.handlerOneEle(aEle); }); @@ -4402,7 +4632,6 @@ var RedirectOnRequest = (function () { }).debounce(function () { return Observable_1.Observable.timer(500); }); }) .subscribe(function () { - _this.log(); _this.scroll().subscribe(function () { _this.handlerOneEleOneByOne(); }); @@ -4411,6 +4640,7 @@ var RedirectOnRequest = (function () { }); _this.handlerAll(); _this.handlerOneEleOneByOne(); + _this.log(); }); }; return RedirectOnRequest; @@ -4419,7 +4649,7 @@ exports.RedirectOnRequest = RedirectOnRequest; /***/ }, -/* 78 */ +/* 82 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Underscore.js 1.8.3 @@ -5973,7 +6203,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Underscor /***/ }, -/* 79 */ +/* 83 */ /***/ function(module, exports) { var g; @@ -5998,7 +6228,7 @@ module.exports = g; /***/ }, -/* 80 */ +/* 84 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -6008,22 +6238,27 @@ __webpack_require__(28); __webpack_require__(27); __webpack_require__(29); __webpack_require__(25); -__webpack_require__(37); +__webpack_require__(38); +__webpack_require__(35); __webpack_require__(34); -__webpack_require__(33); __webpack_require__(30); -__webpack_require__(32); -__webpack_require__(35); -__webpack_require__(36); -__webpack_require__(38); __webpack_require__(31); -var baidu_1 = __webpack_require__(39); -var google_1 = __webpack_require__(40); -var so_1 = __webpack_require__(41); -var zhihu_1 = __webpack_require__(43); -var zhihu_daily_1 = __webpack_require__(42); +__webpack_require__(33); +__webpack_require__(36); +__webpack_require__(37); +__webpack_require__(39); +__webpack_require__(32); +var baidu_1 = __webpack_require__(40); +var google_1 = __webpack_require__(41); +var weibo_1 = __webpack_require__(44); +var twitter_1 = __webpack_require__(43); +var so_1 = __webpack_require__(42); +var zhihu_1 = __webpack_require__(46); +var zhihu_daily_1 = __webpack_require__(45); baidu_1.default.bootstrap(); google_1.default.bootstrap(); +weibo_1.default.bootstrap(); +twitter_1.default.bootstrap(); so_1.default.bootstrap(); zhihu_1.default.bootstrap(); zhihu_daily_1.default.bootstrap(); diff --git a/index.ts b/index.ts index 6017293..ad4643a 100644 --- a/index.ts +++ b/index.ts @@ -7,6 +7,7 @@ import 'rxjs/add/operator/throttle'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/filter'; import 'rxjs/add/operator/debounce'; +import 'rxjs/add/operator/debounceTime'; import 'rxjs/add/operator/do'; import 'rxjs/add/operator/mergeMap'; import 'rxjs/add/operator/retry'; @@ -15,12 +16,16 @@ import 'rxjs/add/operator/delay'; import baiduRedirect from './src/baidu'; import googleRedirect from './src/google'; +import weboRedirect from './src/weibo'; +import twitterRedirect from './src/twitter'; import soRedirect from './src/so'; import zhihuRedirect from './src/zhihu'; import zhihuDailyRedirect from './src/zhihu-daily'; baiduRedirect.bootstrap(); googleRedirect.bootstrap(); +weboRedirect.bootstrap(); +twitterRedirect.bootstrap(); soRedirect.bootstrap(); zhihuRedirect.bootstrap(); zhihuDailyRedirect.bootstrap(); diff --git a/src/baidu.ts b/src/baidu.ts index 9870c86..0cb42ab 100644 --- a/src/baidu.ts +++ b/src/baidu.ts @@ -11,18 +11,52 @@ function getText(htmlElement: HTMLElement): string { return htmlElement.innerText || htmlElement.textContent; } +class Query { + object: any = {}; + + constructor(public queryStr: String) { + this.object = this.toObject(queryStr.replace(/^\?+/, '')); + } + + toObject(queryStr: String) { + let obj = {}; + queryStr.split('&').forEach((item)=> { + let arr = item.split('=') || []; + let key = arr[0] || ''; + obj[key] = arr[1] || ''; + }); + return obj; + } + + public toString(): String { + let arr = []; + for (let key in this.object) { + if (this.object.hasOwnProperty(key)) { + let value = this.object[key]; + arr.push(key + '=' + value); + } + } + return '?' + arr.join('&'); + } + +} + class BaiduRedirect extends RedirectOnRequest { constructor(domainTester, urlTester, matcher, ASelector = 'a') { super(domainTester, urlTester, matcher, ASelector); } handlerAll(): void { - let skipArray: any[] = location.search.match(/pn=(\d+)/) || ['']; - let skip: number = skipArray.length === 2 ? +skipArray[1] : 0; - const href: string = window.top.location.href; - if (!/www\.baidu\.com\/s/.test(href)) return; - let url: string = href.replace(/(\&)(tn=\w+)(\&)/img, '$1' + 'tn=baidulocal' + '$3') + `×tamp=${new Date().getTime()}`; - if (url.indexOf('tn=baidulocal') === -1) url += '&tn=baidulocal'; + if (!/www\.baidu\.com\/s/.test(window.top.location.href)) return; + const query = new Query(window.top.location.search); + const skip = query.object.pn || 0; + + query.object.tn = 'baidulocal'; + query.object.timestamp = new Date().getTime(); + query.object.rn = 50; + + const url: string = `${location.protocol}://${location.host + location.pathname + query}`; + Observable.forkJoin( http.get(url), http.get(url.replace(/pn=(\d+)/, `pn=${skip + 10}`)) @@ -58,10 +92,6 @@ class BaiduRedirect extends RedirectOnRequest { }); } - log(): void { - console.log('bootstrap baidu'); - } - } export default new BaiduRedirect( diff --git a/src/google.ts b/src/google.ts index 5833d50..465cfc2 100644 --- a/src/google.ts +++ b/src/google.ts @@ -23,10 +23,6 @@ class GoogleRedirect extends RedirectOnUrl { }); } - log() { - console.log('bootstrap google'); - } - } export default new GoogleRedirect( diff --git a/src/redirect-on-request.ts b/src/redirect-on-request.ts index 89a3cfc..274d4af 100644 --- a/src/redirect-on-request.ts +++ b/src/redirect-on-request.ts @@ -1,4 +1,5 @@ import {Observable} from 'rxjs/Observable'; +import * as _ from 'underscore'; import {http, Response$, timeout} from './http'; import {CONFIG} from './config'; @@ -14,6 +15,7 @@ class RedirectOnRequest { public match: boolean; public DEBUG = DEBUG; public status: any = status; + public logCount: number = 0; constructor(public domainTester, public urlTester, public matcher, public ASelector = 'a') { this.match = domainTester.test(document.domain); @@ -80,8 +82,17 @@ class RedirectOnRequest { .filter((ele: HTMLAnchorElement)=>ele.nodeName === 'A'); } - log(str?: string): void { - console.log(str || 'boostrap anti-redirect'); + log(project?: string): void { + if (this.logCount < 1) { + console.log( + "%c Anti-Redirect %c Copyright \xa9 2015-%s %s", + 'font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size:64px;color:#00bbee;-webkit-text-fill-color:#00bbee;-webkit-text-stroke: 1px #00bbee;', + "font-size:12px;color:#999999;", + (new Date).getFullYear(), + '\n' + (project || '') + ); + this.logCount++; + } } bootstrap(): void { @@ -107,8 +118,6 @@ class RedirectOnRequest { }) .subscribe(()=> { - this.log(); - this.scroll().subscribe(()=> { this.handlerOneEleOneByOne(); }); @@ -120,6 +129,8 @@ class RedirectOnRequest { this.handlerAll(); this.handlerOneEleOneByOne(); + this.log(); + }); } } diff --git a/src/redirect-on-url.ts b/src/redirect-on-url.ts index 9485fcb..c0f025b 100644 --- a/src/redirect-on-url.ts +++ b/src/redirect-on-url.ts @@ -4,8 +4,10 @@ const DEBUG = CONFIG.debug; class RedirectOnUrl { public match: boolean = false; + public DEBUG: boolean = DEBUG; + public logCount: number = 0; - constructor(private domainTester, private urlTester, private matcher, private ASelector = 'a') { + constructor(public domainTester, public urlTester, public matcher, public ASelector = 'a') { this.match = domainTester.test(document.domain); } @@ -25,48 +27,54 @@ class RedirectOnUrl { }) } - scroll(): Observable { - return Observable.fromEvent(document, 'mousemove') - .debounce(()=>Observable.timer(500)) + scroll() { + return Observable.fromEvent(document, 'scroll') + .debounceTime(500) .flatMap(()=>Observable.from([].slice.call(document.querySelectorAll(this.ASelector)))) - .do((aEle: HTMLAnchorElement)=> { + .subscribe((aEle: HTMLAnchorElement)=> { this.handlerOneEle(aEle).subscribe(function () { }); - }) + }); } mouseover(): Observable { return Observable.fromEvent(document, 'mousemove') - .throttle(()=>Observable.timer(100)) + .debounce(()=>Observable.timer(100)) .map(function (event: any): HTMLElement { let target = event.target; return target.nodeName === 'A' ? target : target.parentNode.nodeName === 'A' ? target.parentNode : target; }) .filter(function (ele: HTMLElement) { - return ele.nodeName === 'A' - }) - .flatMap((aEle: HTMLAnchorElement)=>this.handlerOneEle(aEle)) + return ele.nodeName === 'A'; + }); } - log(str?: string): void { - console.log(str || 'boostrap anti-redirect'); + log(project?: string): void { + if (this.logCount < 1) { + console.log( + "%c Anti-Redirect %c Copyright \xa9 2015-%s %s", + 'font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size:64px;color:#00bbee;-webkit-text-fill-color:#00bbee;-webkit-text-stroke: 1px #00bbee;', + "font-size:12px;color:#999999;", + (new Date).getFullYear(), + '\n' + (project || '') + ); + this.logCount++; + } } bootstrap(): void { if (!this.match) return; Observable.fromEvent(document, 'DOMContentLoaded') - .flatMap(()=>Observable.timer(1000)) + .delay(300) .subscribe(()=> { - this.log(); - - this.scroll().subscribe(function () { + this.scroll(); + this.mouseover().subscribe((aEle: HTMLAnchorElement)=> { + this.handlerOneEle(aEle) }); - this.mouseover().subscribe(function () { - - }) + this.log(); }); } diff --git a/src/so.ts b/src/so.ts index 27d7f13..464bc15 100644 --- a/src/so.ts +++ b/src/so.ts @@ -4,9 +4,6 @@ class SoRedirect extends RedirectOnUrl { constructor(domainTester, urlTester, matcher) { super(domainTester, urlTester, matcher); } - log() { - console.log('bootstrap 360 so'); - } } export default new SoRedirect( diff --git a/src/twitter.ts b/src/twitter.ts new file mode 100644 index 0000000..89962a1 --- /dev/null +++ b/src/twitter.ts @@ -0,0 +1,29 @@ +import {Observable} from 'rxjs/Observable'; +import {RedirectOnUrl} from './redirect-on-url'; + +class TwitterRedirect extends RedirectOnUrl { + constructor(domainTester, urlTester, matcher) { + super(domainTester, urlTester, matcher); + } + + handlerOneEle(aEle: HTMLAnchorElement): Observable { + return Observable.of(aEle) + .filter((ele: HTMLAnchorElement)=> { + return this.urlTester.test(ele.href) && /^https?:\/\//.test(ele.title); + }) + .do((aEle: HTMLAnchorElement)=> { + let url: string = decodeURIComponent(aEle.title); + if (url) { + aEle.href = url; + this.DEBUG && (aEle.style.backgroundColor = 'green'); + } + }) + } + +} + +export default new TwitterRedirect( + /twitter\.com/, + /t\.co\/\w+/, + null +) \ No newline at end of file diff --git a/src/weibo.ts b/src/weibo.ts new file mode 100644 index 0000000..f19197f --- /dev/null +++ b/src/weibo.ts @@ -0,0 +1,29 @@ +import {Observable} from 'rxjs/Observable'; +import {RedirectOnUrl} from './redirect-on-url'; + +class WeiboRedirect extends RedirectOnUrl { + constructor(domainTester, urlTester, matcher) { + super(domainTester, urlTester, matcher); + } + + handlerOneEle(aEle: HTMLAnchorElement): Observable { + return Observable.of(aEle) + .filter((ele: HTMLAnchorElement)=> { + return this.urlTester.test(ele.href) && /^https?:\/\//.test(ele.title); + }) + .do((aEle: HTMLAnchorElement)=> { + let url: string = decodeURIComponent(aEle.title); + if (url) { + aEle.href = url; + this.DEBUG && (aEle.style.backgroundColor = 'green'); + } + }) + } + +} + +export default new WeiboRedirect( + /weibo\.com/, + /t\.cn\/\w+/, + null +) \ No newline at end of file diff --git a/src/zhihu-daily.ts b/src/zhihu-daily.ts index 3d1c1cc..3d70a71 100644 --- a/src/zhihu-daily.ts +++ b/src/zhihu-daily.ts @@ -4,9 +4,6 @@ class ZhihuDailyRedirect extends RedirectOnUrl { constructor(domainTester, urlTester, matcher) { super(domainTester, urlTester, matcher); } - log() { - console.log('bootstrap zhihu daily'); - } } export default new ZhihuDailyRedirect( diff --git a/src/zhihu.ts b/src/zhihu.ts index f7bd086..765b55f 100644 --- a/src/zhihu.ts +++ b/src/zhihu.ts @@ -4,9 +4,6 @@ class ZhihuRedirect extends RedirectOnUrl { constructor(domainTester, urlTester, matcher) { super(domainTester, urlTester, matcher); } - log() { - console.log('bootstrap zhihu'); - } } export default new ZhihuRedirect( diff --git a/webpack.config.js b/webpack.config.js index 2944340..69aad59 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -48,6 +48,8 @@ module.exports = { // @include *www.so.com* // @include *www.zhihu.com* // @include *daily.zhihu.com* +// @include *weibo.com* +// @include *twitter.com* // @connect * // @compatible chrome 完美运行 // @compatible firefox 完美运行