]> git.wh0rd.org - tt-rss.git/blobdiff - lib/dojo/hash.js
support disabling of e-mail digests entirely
[tt-rss.git] / lib / dojo / hash.js
index b73d3705841d587a6e8e29aa1dc6728034b21670..30235783624c4b1e737d62d403a0b5374c1dd7ef 100644 (file)
@@ -1,137 +1,8 @@
 /*
-       Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
+       Copyright (c) 2004-2016, The JS Foundation All Rights Reserved.
        Available via Academic Free License >= 2.1 OR the modified BSD license.
        see: http://dojotoolkit.org/license for details
 */
 
-
-if(!dojo._hasResource["dojo.hash"]){
-dojo._hasResource["dojo.hash"]=true;
-dojo.provide("dojo.hash");
-(function(){
-dojo.hash=function(_1,_2){
-if(!arguments.length){
-return _3();
-}
-if(_1.charAt(0)=="#"){
-_1=_1.substring(1);
-}
-if(_2){
-_4(_1);
-}else{
-location.href="#"+_1;
-}
-return _1;
-};
-var _5=null,_6=null,_7=dojo.config.hashPollFrequency||100;
-function _8(_9,_a){
-var i=_9.indexOf(_a);
-return (i>=0)?_9.substring(i+1):"";
-};
-function _3(){
-return _8(location.href,"#");
-};
-function _b(){
-dojo.publish("/dojo/hashchange",[_3()]);
-};
-function _c(){
-if(_3()===_5){
-return;
-}
-_5=_3();
-_b();
-};
-function _4(_d){
-if(_6){
-if(_6.isTransitioning()){
-setTimeout(dojo.hitch(null,_4,_d),_7);
-return;
-}
-var _e=_6.iframe.location.href;
-var _f=_e.indexOf("?");
-_6.iframe.location.replace(_e.substring(0,_f)+"?"+_d);
-return;
-}
-location.replace("#"+_d);
-_c();
-};
-function _10(){
-var ifr=document.createElement("iframe"),_11="dojo-hash-iframe",_12=dojo.config.dojoBlankHtmlUrl||dojo.moduleUrl("dojo","resources/blank.html");
-ifr.id=_11;
-ifr.src=_12+"?"+_3();
-ifr.style.display="none";
-document.body.appendChild(ifr);
-this.iframe=dojo.global[_11];
-var _13,_14,_15,_16,_17,_18=this.iframe.location;
-function _19(){
-_5=_3();
-_13=_17?_5:_8(_18.href,"?");
-_14=false;
-_15=null;
-};
-this.isTransitioning=function(){
-return _14;
-};
-this.pollLocation=function(){
-if(!_17){
-try{
-var _1a=_8(_18.href,"?");
-if(document.title!=_16){
-_16=this.iframe.document.title=document.title;
-}
-}
-catch(e){
-_17=true;
-console.error("dojo.hash: Error adding history entry. Server unreachable.");
-}
-}
-var _1b=_3();
-if(_14&&_5===_1b){
-if(_17||_1a===_15){
-_19();
-_b();
-}else{
-setTimeout(dojo.hitch(this,this.pollLocation),0);
-return;
-}
-}else{
-if(_5===_1b&&(_17||_13===_1a)){
-}else{
-if(_5!==_1b){
-_5=_1b;
-_14=true;
-_15=_1b;
-ifr.src=_12+"?"+_15;
-_17=false;
-setTimeout(dojo.hitch(this,this.pollLocation),0);
-return;
-}else{
-if(!_17){
-location.href="#"+_18.search.substring(1);
-_19();
-_b();
-}
-}
-}
-}
-setTimeout(dojo.hitch(this,this.pollLocation),_7);
-};
-_19();
-setTimeout(dojo.hitch(this,this.pollLocation),_7);
-};
-dojo.addOnLoad(function(){
-if("onhashchange" in dojo.global&&(!dojo.isIE||(dojo.isIE>=8&&document.compatMode!="BackCompat"))){
-dojo.connect(dojo.global,"onhashchange",_b);
-}else{
-if(document.addEventListener){
-_5=_3();
-setInterval(_c,_7);
-}else{
-if(document.attachEvent){
-_6=new _10();
-}
-}
-}
-});
-})();
-}
+//>>built
+define("dojo/hash",["./_base/kernel","require","./_base/config","./aspect","./_base/lang","./topic","./domReady","./sniff"],function(_1,_2,_3,_4,_5,_6,_7,_8){_1.hash=function(_9,_a){if(!arguments.length){return _b();}if(_9.charAt(0)=="#"){_9=_9.substring(1);}if(_a){_c(_9);}else{location.hash="#"+_9;}return _9;};var _d,_e,_f,_10=_3.hashPollFrequency||100;function _11(str,_12){var i=str.indexOf(_12);return (i>=0)?str.substring(i+1):"";};function _b(){return _11(location.href,"#");};function _13(){_6.publish("/dojo/hashchange",_b());};function _14(){if(_b()===_d){return;}_d=_b();_13();};function _c(_15){if(_e){if(_e.isTransitioning()){setTimeout(_5.hitch(null,_c,_15),_10);return;}var _16=_e.iframe.location.href;var _17=_16.indexOf("?");_e.iframe.location.replace(_16.substring(0,_17)+"?"+_15);return;}var _16=location.href.replace(/#.*/,"");location.replace(_16+"#"+_15);!_f&&_14();};function _18(){var ifr=document.createElement("iframe"),_19="dojo-hash-iframe",_1a=_3.dojoBlankHtmlUrl||_2.toUrl("./resources/blank.html");if(_3.useXDomain&&!_3.dojoBlankHtmlUrl){console.warn("dojo/hash: When using cross-domain Dojo builds,"+" please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl"+" to the path on your domain to blank.html");}ifr.id=_19;ifr.src=_1a+"?"+_b();ifr.style.display="none";document.body.appendChild(ifr);this.iframe=_1.global[_19];var _1b,_1c,_1d,_1e,_1f,_20=this.iframe.location;function _21(){_d=_b();_1b=_1f?_d:_11(_20.href,"?");_1c=false;_1d=null;};this.isTransitioning=function(){return _1c;};this.pollLocation=function(){if(!_1f){try{var _22=_11(_20.href,"?");if(document.title!=_1e){_1e=this.iframe.document.title=document.title;}}catch(e){_1f=true;console.error("dojo/hash: Error adding history entry. Server unreachable.");}}var _23=_b();if(_1c&&_d===_23){if(_1f||_22===_1d){_21();_13();}else{setTimeout(_5.hitch(this,this.pollLocation),0);return;}}else{if(_d===_23&&(_1f||_1b===_22)){}else{if(_d!==_23){_d=_23;_1c=true;_1d=_23;ifr.src=_1a+"?"+_1d;_1f=false;setTimeout(_5.hitch(this,this.pollLocation),0);return;}else{if(!_1f){location.href="#"+_20.search.substring(1);_21();_13();}}}}setTimeout(_5.hitch(this,this.pollLocation),_10);};_21();setTimeout(_5.hitch(this,this.pollLocation),_10);};_7(function(){if("onhashchange" in _1.global&&(!_8("ie")||(_8("ie")>=8&&document.compatMode!="BackCompat"))){_f=_4.after(_1.global,"onhashchange",_13,true);}else{if(document.addEventListener){_d=_b();setInterval(_14,_10);}else{if(document.attachEvent){_e=new _18();}}}});return _1.hash;});
\ No newline at end of file