Permalink
Browse files

Updates version and adds suitable parameters.

  • Loading branch information...
1 parent c2164fd commit 6367074bc1fadb32fcf08c34802dfd4cb877d8da @asual asual committed Mar 20, 2010
View
22 dist/jquery.address-1.2.js
@@ -6,7 +6,7 @@
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
- * Date: 2010-03-19 09:31:48 +0200 (Fri, 19 Mar 2010)
+ * Date: 2010-03-20 21:26:11 +0200 (Sat, 20 Mar 2010)
*/
(function ($) {
@@ -64,7 +64,10 @@
(direction ? _value.replace(/\?/, '%3F') : _value.replace(/%253F/, '?')) : value;
},
_crawl = function(value, direction) {
- return direction ? (value != '' ? '!' : '') + value : value.replace(/^\!/, '');
+ if (_opts.crawlable) {
+ return direction ? (value != '' ? '!' : '') + value : value.replace(/^\!/, '');
+ }
+ return value;
},
_search = function(el) {
var url, s;
@@ -197,6 +200,12 @@
HASH_CHANGE = 'hashchange',
TRUE = true,
FALSE = false,
+ _opts = {
+ autoUpdate: TRUE,
+ crawlable: TRUE,
+ history: TRUE,
+ strict: TRUE
+ },
_browser = $.browser,
_version = parseFloat($.browser.version),
_mozilla = _browser.mozilla,
@@ -226,14 +235,7 @@
_updating = FALSE,
_stack = [],
_listeners = {},
- _value = _hash(),
- _api = {},
- _opts = {
- autoUpdate: TRUE,
- crawlable: TRUE,
- history: TRUE,
- strict: TRUE
- };
+ _value = _hash();
if (_msie) {
_version = parseFloat(_agent.substr(_agent.indexOf('MSIE') + 4));
View
30 dist/jquery.address-1.2.min.js
@@ -6,20 +6,20 @@
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
- * Date: 2010-03-19 09:31:48 +0200 (Fri, 19 Mar 2010)
+ * Date: 2010-03-20 21:26:11 +0200 (Sat, 20 Mar 2010)
*/
(function(c){c.address=function(){var A=function(a){c(c.address).trigger(c.extend(c.Event(a),function(){for(var b={},h=c.address.parameterNames(),f=0,p=h.length;f<p;f++)b[h[f]]=c.address.parameter(h[f]);return{value:c.address.value(),path:c.address.path(),pathNames:c.address.pathNames(),parameterNames:h,parameters:b,queryString:c.address.queryString()}}.call(c.address)))},v=function(a,b,h){if(h||b)c(c.address).bind(a,h||b,h&&b);return c.address},s=function(){var a=d.href.indexOf("#");return a!=-1?
-T(I(t(d.href.substr(a+1),i))):""},U=function(){return"javascript"},V=function(a,b){if(j.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){return b?(a!=""?"!":"")+a:a.replace(/^\!/,"")},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=s(),b=g!=a;if(B&&
-m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(i)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(i)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[j.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==L)pageTracker._trackPageview(a);
-else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0";k.src=U()+":"+i;k.noResize=e;k.frameBorder=k.frameSpacing=0}else{k.src=U()+":"+i;k.style.display=
-"none";l.body.insertAdjacentElement("afterBegin",k)}D(function(){c(k).bind("load",function(){var b=k.contentWindow;g=typeof b[q]!=x?b[q]:"";if(g!=s()){F(i);d.hash=J(t(g,e),e)}});typeof k.contentWindow[q]==x&&Y()},50)}else if(B){if(m<418){c(l.body).append('<form id="'+q+'" style="position:absolute;top:-9999px;" method="get"></form>');N=l.getElementById(q)}if(typeof d[q]==x)d[q]={};if(typeof d[q][d.pathname]!=x)w=d[q][d.pathname].split(",")}D(function(){A("init");F(i)},1);if(u&&m>7||!u&&"on"+H in o)if(o.addEventListener)o.addEventListener(H,
-G,false);else o.attachEvent&&o.attachEvent("on"+H,G);else da(G,50);c("a[rel*=address:]").address()}},ea=function(){if(o.removeEventListener)o.removeEventListener(H,G,false);else o.detachEvent&&o.detachEvent("on"+H,G)},q="jQueryAddress",L="function",x="undefined",H="hashchange",e=true,i=false,n=c.browser,m=parseFloat(c.browser.version),aa=n.mozilla,u=n.msie,r=n.opera,B=n.safari,O=i,o=function(){try{return top.document!==undefined?top:window}catch(a){return window}}(),l=o.document,E=o.history,d=o.location,
-da=setInterval,D=setTimeout,I=decodeURI,T=encodeURI;n=navigator.userAgent;var k,N,y=W(document),ba=y?y.indexOf("?"):-1,fa=l.title,C=E.length,K=i,Z=i,P=e,ca=e,M=i,w=[],g=s(),j={autoUpdate:e,crawlable:e,history:e,strict:e};if(u){m=parseFloat(n.substr(n.indexOf("MSIE")+4));if(l.documentMode&&l.documentMode!=m)m=l.documentMode!=8?7:8}if(O=aa&&m>=1||u&&m>=6||r&&m>=9.5||B&&m>=312){for(n=1;n<C;n++)w.push("");w.push(g);if(u&&d.hash!=g)d.hash="#"+J(t(g,e),e);if(r)history.navigationMode="compatible";if(y&&
-ba!=-1){y=y.substr(ba+1).split("&");for(n=0;n<y.length;n++){r=y[n].split("=");if(/^(autoUpdate|crawlable|history|strict)$/.test(r[0]))j[r[0]]=isNaN(r[1])?/^(true|yes)$/i.test(r[1]):parseInt(r[1],10)!==0;if(/^tracker$/.test(r[0]))j[r[0]]=r[1]}}document.readyState=="complete"&&$();c($);c(window).bind("unload",ea)}else if(!O&&s()!=""||B&&m<418&&s()!=""&&d.search!=""){l.open();l.write('<html><head><meta http-equiv="refresh" content="0;url='+d.href.substr(0,d.href.indexOf("#"))+'" /></head></html>');l.close()}else X();
-return{init:function(a,b){return v("init",a,b)},change:function(a,b){return v("change",a,b)},internalChange:function(a,b){return v("internalChange",a,b)},externalChange:function(a,b){return v("externalChange",a,b)},baseURL:function(){var a=d.href;if(s()!="")a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},strict:function(a){if(a!==undefined){j.strict=a;return this}return j.strict},crawlable:function(a){if(a!==undefined){j.crawlable=a;return this}return j.crawlable},
-autoUpdate:function(a){if(a!==undefined){j.autoUpdate=a;return this}return j.autoUpdate},update:function(){M=e;this.value(g);M=i;return this},history:function(a){if(a!==undefined){j.history=a;return this}return j.history},tracker:function(a){if(a!==undefined){j.tracker=a;return this}return j.tracker},title:function(a){if(a!==undefined){a=I(a);D(function(){fa=l.title=a;if(ca&&k&&k.contentWindow&&k.contentWindow.document){k.contentWindow.document.title=a;ca=i}if(!P&&aa)d.replace(d.href.indexOf("#")!=
--1?d.href:d.href+"#");P=i},50);return this}return l.title},value:function(a){if(a!==undefined){a=T(I(V(a,e)));if(a=="/")a="";if(g==a&&!M)return;P=e;g=a;if(j.autoUpdate||M){K=e;F(e);w[E.length]=g;if(B)if(j.history){d[q][d.pathname]=w.toString();C=E.length+1;if(m<418){if(d.search==""){N.action="#"+t(g,e);N.submit()}}else if(m<523||g==""){a=l.createEvent("MouseEvents");a.initEvent("click",e,e);var b=l.createElement("a");b.href="#"+t(g,e);b.dispatchEvent(a)}else d.hash="#"+t(g,e)}else d.replace("#"+t(g,
-e));else if(g!=s())if(j.history)d.hash="#"+J(t(g,e),e);else d.replace("#"+t(g,e));u&&m<8&&j.history&&D(Y,50);if(B)D(function(){K=i},1);else K=i}return this}if(!O)return null;return I(V(J(g,i),i))},path:function(a){if(a!==undefined){var b=this.queryString();this.value(a+(b?"?"+b:""));return this}a=this.value();return a.indexOf("?")!=-1?a.split("?")[0]:a},queryString:function(a){if(a!==undefined){this.value(this.path()+(a?"?"+a:""));return this}a=this.value();var b=a.indexOf("?");if(b!=-1&&b<a.length)return a.substr(b+
-1)},parameter:function(a,b,h){var f,p;if(b!==undefined){var Q=this.parameterNames();p=[];for(f=0;f<Q.length;f++){var R=Q[f],z=this.parameter(R);if(typeof z=="string")z=[z];if(R==a)z=b===null||b==""?[]:h?z.concat([b]):[b];for(var S=0;S<z.length;S++)p.push(R+"="+z[S])}c.inArray(a,Q)==-1&&p.push(a+"="+b);this.queryString(p.join("&"));return this}b=this.value();f=b.indexOf("?");if(f!=-1){b=b.substr(f+1);p=b.split("&");b=[];for(f=0;f<p.length;f++){h=p[f].split("=");h[0]==a&&b.push(h[1])}if(b.length!==
-0)return b.length!=1?b:b[0]}},pathNames:function(){var a=this.path(),b=a.split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.value(),b=a.indexOf("?"),h=[];if(b!=-1){a=a.substr(b+1);if(a!=""&&a.indexOf("=")!=-1){a=a.split("&");for(b=0;b<a.length;b++){var f=a[b].split("=")[0];c.inArray(f,h)==-1&&h.push(f)}}}return h}}}();c.fn.address=function(A){var v=function(){var s=A?A.call(this):/address:/.test(c(this).attr("rel"))?
-c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(s);return false};c(this).click(v).live("click",v)}})(jQuery);
+T(I(t(d.href.substr(a+1),j))):""},U=function(){return"javascript"},V=function(a,b){if(i.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){if(i.crawlable)return b?(a!=""?"!":"")+a:a.replace(/^\!/,"");return a},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=
+s(),b=g!=a;if(B&&m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(j)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(j)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[i.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==
+L)pageTracker._trackPageview(a);else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0";k.src=U()+":"+j;k.noResize=e;k.frameBorder=k.frameSpacing=0}else{k.src=
+U()+":"+j;k.style.display="none";l.body.insertAdjacentElement("afterBegin",k)}D(function(){c(k).bind("load",function(){var b=k.contentWindow;g=typeof b[q]!=x?b[q]:"";if(g!=s()){F(j);d.hash=J(t(g,e),e)}});typeof k.contentWindow[q]==x&&Y()},50)}else if(B){if(m<418){c(l.body).append('<form id="'+q+'" style="position:absolute;top:-9999px;" method="get"></form>');N=l.getElementById(q)}if(typeof d[q]==x)d[q]={};if(typeof d[q][d.pathname]!=x)w=d[q][d.pathname].split(",")}D(function(){A("init");F(j)},1);
+if(u&&m>7||!u&&"on"+H in o)if(o.addEventListener)o.addEventListener(H,G,false);else o.attachEvent&&o.attachEvent("on"+H,G);else da(G,50);c("a[rel*=address:]").address()}},ea=function(){if(o.removeEventListener)o.removeEventListener(H,G,false);else o.detachEvent&&o.detachEvent("on"+H,G)},q="jQueryAddress",L="function",x="undefined",H="hashchange",e=true,j=false,i={autoUpdate:e,crawlable:e,history:e,strict:e},n=c.browser,m=parseFloat(c.browser.version),aa=n.mozilla,u=n.msie,r=n.opera,B=n.safari,O=j,
+o=function(){try{return top.document!==undefined?top:window}catch(a){return window}}(),l=o.document,E=o.history,d=o.location,da=setInterval,D=setTimeout,I=decodeURI,T=encodeURI;n=navigator.userAgent;var k,N,y=W(document),ba=y?y.indexOf("?"):-1,fa=l.title,C=E.length,K=j,Z=j,P=e,ca=e,M=j,w=[],g=s();if(u){m=parseFloat(n.substr(n.indexOf("MSIE")+4));if(l.documentMode&&l.documentMode!=m)m=l.documentMode!=8?7:8}if(O=aa&&m>=1||u&&m>=6||r&&m>=9.5||B&&m>=312){for(n=1;n<C;n++)w.push("");w.push(g);if(u&&d.hash!=
+g)d.hash="#"+J(t(g,e),e);if(r)history.navigationMode="compatible";if(y&&ba!=-1){y=y.substr(ba+1).split("&");for(n=0;n<y.length;n++){r=y[n].split("=");if(/^(autoUpdate|crawlable|history|strict)$/.test(r[0]))i[r[0]]=isNaN(r[1])?/^(true|yes)$/i.test(r[1]):parseInt(r[1],10)!==0;if(/^tracker$/.test(r[0]))i[r[0]]=r[1]}}document.readyState=="complete"&&$();c($);c(window).bind("unload",ea)}else if(!O&&s()!=""||B&&m<418&&s()!=""&&d.search!=""){l.open();l.write('<html><head><meta http-equiv="refresh" content="0;url='+
+d.href.substr(0,d.href.indexOf("#"))+'" /></head></html>');l.close()}else X();return{init:function(a,b){return v("init",a,b)},change:function(a,b){return v("change",a,b)},internalChange:function(a,b){return v("internalChange",a,b)},externalChange:function(a,b){return v("externalChange",a,b)},baseURL:function(){var a=d.href;if(s()!="")a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},strict:function(a){if(a!==undefined){i.strict=a;return this}return i.strict},crawlable:function(a){if(a!==
+undefined){i.crawlable=a;return this}return i.crawlable},autoUpdate:function(a){if(a!==undefined){i.autoUpdate=a;return this}return i.autoUpdate},update:function(){M=e;this.value(g);M=j;return this},history:function(a){if(a!==undefined){i.history=a;return this}return i.history},tracker:function(a){if(a!==undefined){i.tracker=a;return this}return i.tracker},title:function(a){if(a!==undefined){a=I(a);D(function(){fa=l.title=a;if(ca&&k&&k.contentWindow&&k.contentWindow.document){k.contentWindow.document.title=
+a;ca=j}if(!P&&aa)d.replace(d.href.indexOf("#")!=-1?d.href:d.href+"#");P=j},50);return this}return l.title},value:function(a){if(a!==undefined){a=T(I(V(a,e)));if(a=="/")a="";if(g==a&&!M)return;P=e;g=a;if(i.autoUpdate||M){K=e;F(e);w[E.length]=g;if(B)if(i.history){d[q][d.pathname]=w.toString();C=E.length+1;if(m<418){if(d.search==""){N.action="#"+t(g,e);N.submit()}}else if(m<523||g==""){a=l.createEvent("MouseEvents");a.initEvent("click",e,e);var b=l.createElement("a");b.href="#"+t(g,e);b.dispatchEvent(a)}else d.hash=
+"#"+t(g,e)}else d.replace("#"+t(g,e));else if(g!=s())if(i.history)d.hash="#"+J(t(g,e),e);else d.replace("#"+t(g,e));u&&m<8&&i.history&&D(Y,50);if(B)D(function(){K=j},1);else K=j}return this}if(!O)return null;return I(V(J(g,j),j))},path:function(a){if(a!==undefined){var b=this.queryString();this.value(a+(b?"?"+b:""));return this}a=this.value();return a.indexOf("?")!=-1?a.split("?")[0]:a},queryString:function(a){if(a!==undefined){this.value(this.path()+(a?"?"+a:""));return this}a=this.value();var b=
+a.indexOf("?");if(b!=-1&&b<a.length)return a.substr(b+1)},parameter:function(a,b,h){var f,p;if(b!==undefined){var Q=this.parameterNames();p=[];for(f=0;f<Q.length;f++){var R=Q[f],z=this.parameter(R);if(typeof z=="string")z=[z];if(R==a)z=b===null||b==""?[]:h?z.concat([b]):[b];for(var S=0;S<z.length;S++)p.push(R+"="+z[S])}c.inArray(a,Q)==-1&&p.push(a+"="+b);this.queryString(p.join("&"));return this}b=this.value();f=b.indexOf("?");if(f!=-1){b=b.substr(f+1);p=b.split("&");b=[];for(f=0;f<p.length;f++){h=
+p[f].split("=");h[0]==a&&b.push(h[1])}if(b.length!==0)return b.length!=1?b:b[0]}},pathNames:function(){var a=this.path(),b=a.split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.value(),b=a.indexOf("?"),h=[];if(b!=-1){a=a.substr(b+1);if(a!=""&&a.indexOf("=")!=-1){a=a.split("&");for(b=0;b<a.length;b++){var f=a[b].split("=")[0];c.inArray(f,h)==-1&&h.push(f)}}}return h}}}();c.fn.address=function(A){var v=
+function(){var s=A?A.call(this):/address:/.test(c(this).attr("rel"))?c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(s);return false};c(this).click(v).live("click",v)}})(jQuery);
View
2 dist/jquery.address-optimizer-1.2.js
@@ -6,7 +6,7 @@
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
- * Date: 2010-03-19 09:31:49 +0200 (Fri, 19 Mar 2010)
+ * Date: 2010-03-20 21:26:11 +0200 (Sat, 20 Mar 2010)
*/
(function() {
View
2 dist/jquery.address-optimizer-1.2.min.js
@@ -6,7 +6,7 @@
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
- * Date: 2010-03-19 09:31:49 +0200 (Fri, 19 Mar 2010)
+ * Date: 2010-03-20 21:26:11 +0200 (Sat, 20 Mar 2010)
*/
(function(){var m=function(e){for(var h,l,f=0,n=e.childNodes.length;f<n;f++){if(e.childNodes[f].src)h=String(e.childNodes[f].src);if(l=m(e.childNodes[f]))h=l}return h},b=m(document),g=b?b.indexOf("?"):-1,a=function(){try{return top.document!==undefined?top:window}catch(e){return window}}(),o=a.document;a=a.location;var p=navigator,i=a.href.indexOf("#"),j=i!=-1,c={};if(b&&g!=-1){g=b.substr(g+1).split("&");for(var k=0;k<g.length;k++){b=g[k].split("=");if(/^(base|address)$/.test(b[0]))c[b[0]]=unescape(b[1])}}if(j&&
i-(a.href.indexOf(a.pathname,a.protocol.length+2)+a.pathname.indexOf(c.base)+c.base.length)>1)j=false;b=a.href.split(a.hostname)[1].replace(c.base,"");if(c.address!="/"&&(!j||i==a.href.length-1)&&b!=""&&b!="/"){var d;if(window.XMLHttpRequest)d=new XMLHttpRequest;else if(window.ActiveXObject)try{try{d=new ActiveXObject("Msxml2.XMLHTTP")}catch(q){d=new ActiveXObject("Microsoft.XMLHTTP")}}catch(r){}if(d){d.open("get",(typeof c.base!="undefined"?c.base:"")+"/?"+c.address+(a.hash!=""?"&hash="+a.hash.replace(/^#/,
View
2 samples/accordion/index.html
@@ -6,7 +6,7 @@
<link type="text/css" href="styles.css" rel="stylesheet">
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jquery.accordion.js"></script>
- <script type="text/javascript" src="jquery.address-1.2.min.js?autoUpdate=false"></script>
+ <script type="text/javascript" src="jquery.address-1.2.min.js?autoUpdate=false&amp;crawlable=false"></script>
<script type="text/javascript">
$(function () {
View
30 samples/accordion/jquery.address-1.2.min.js
@@ -6,20 +6,20 @@
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
- * Date: 2010-03-19 09:31:48 +0200 (Fri, 19 Mar 2010)
+ * Date: 2010-03-20 21:26:11 +0200 (Sat, 20 Mar 2010)
*/
(function(c){c.address=function(){var A=function(a){c(c.address).trigger(c.extend(c.Event(a),function(){for(var b={},h=c.address.parameterNames(),f=0,p=h.length;f<p;f++)b[h[f]]=c.address.parameter(h[f]);return{value:c.address.value(),path:c.address.path(),pathNames:c.address.pathNames(),parameterNames:h,parameters:b,queryString:c.address.queryString()}}.call(c.address)))},v=function(a,b,h){if(h||b)c(c.address).bind(a,h||b,h&&b);return c.address},s=function(){var a=d.href.indexOf("#");return a!=-1?
-T(I(t(d.href.substr(a+1),i))):""},U=function(){return"javascript"},V=function(a,b){if(j.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){return b?(a!=""?"!":"")+a:a.replace(/^\!/,"")},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=s(),b=g!=a;if(B&&
-m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(i)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(i)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[j.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==L)pageTracker._trackPageview(a);
-else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0";k.src=U()+":"+i;k.noResize=e;k.frameBorder=k.frameSpacing=0}else{k.src=U()+":"+i;k.style.display=
-"none";l.body.insertAdjacentElement("afterBegin",k)}D(function(){c(k).bind("load",function(){var b=k.contentWindow;g=typeof b[q]!=x?b[q]:"";if(g!=s()){F(i);d.hash=J(t(g,e),e)}});typeof k.contentWindow[q]==x&&Y()},50)}else if(B){if(m<418){c(l.body).append('<form id="'+q+'" style="position:absolute;top:-9999px;" method="get"></form>');N=l.getElementById(q)}if(typeof d[q]==x)d[q]={};if(typeof d[q][d.pathname]!=x)w=d[q][d.pathname].split(",")}D(function(){A("init");F(i)},1);if(u&&m>7||!u&&"on"+H in o)if(o.addEventListener)o.addEventListener(H,
-G,false);else o.attachEvent&&o.attachEvent("on"+H,G);else da(G,50);c("a[rel*=address:]").address()}},ea=function(){if(o.removeEventListener)o.removeEventListener(H,G,false);else o.detachEvent&&o.detachEvent("on"+H,G)},q="jQueryAddress",L="function",x="undefined",H="hashchange",e=true,i=false,n=c.browser,m=parseFloat(c.browser.version),aa=n.mozilla,u=n.msie,r=n.opera,B=n.safari,O=i,o=function(){try{return top.document!==undefined?top:window}catch(a){return window}}(),l=o.document,E=o.history,d=o.location,
-da=setInterval,D=setTimeout,I=decodeURI,T=encodeURI;n=navigator.userAgent;var k,N,y=W(document),ba=y?y.indexOf("?"):-1,fa=l.title,C=E.length,K=i,Z=i,P=e,ca=e,M=i,w=[],g=s(),j={autoUpdate:e,crawlable:e,history:e,strict:e};if(u){m=parseFloat(n.substr(n.indexOf("MSIE")+4));if(l.documentMode&&l.documentMode!=m)m=l.documentMode!=8?7:8}if(O=aa&&m>=1||u&&m>=6||r&&m>=9.5||B&&m>=312){for(n=1;n<C;n++)w.push("");w.push(g);if(u&&d.hash!=g)d.hash="#"+J(t(g,e),e);if(r)history.navigationMode="compatible";if(y&&
-ba!=-1){y=y.substr(ba+1).split("&");for(n=0;n<y.length;n++){r=y[n].split("=");if(/^(autoUpdate|crawlable|history|strict)$/.test(r[0]))j[r[0]]=isNaN(r[1])?/^(true|yes)$/i.test(r[1]):parseInt(r[1],10)!==0;if(/^tracker$/.test(r[0]))j[r[0]]=r[1]}}document.readyState=="complete"&&$();c($);c(window).bind("unload",ea)}else if(!O&&s()!=""||B&&m<418&&s()!=""&&d.search!=""){l.open();l.write('<html><head><meta http-equiv="refresh" content="0;url='+d.href.substr(0,d.href.indexOf("#"))+'" /></head></html>');l.close()}else X();
-return{init:function(a,b){return v("init",a,b)},change:function(a,b){return v("change",a,b)},internalChange:function(a,b){return v("internalChange",a,b)},externalChange:function(a,b){return v("externalChange",a,b)},baseURL:function(){var a=d.href;if(s()!="")a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},strict:function(a){if(a!==undefined){j.strict=a;return this}return j.strict},crawlable:function(a){if(a!==undefined){j.crawlable=a;return this}return j.crawlable},
-autoUpdate:function(a){if(a!==undefined){j.autoUpdate=a;return this}return j.autoUpdate},update:function(){M=e;this.value(g);M=i;return this},history:function(a){if(a!==undefined){j.history=a;return this}return j.history},tracker:function(a){if(a!==undefined){j.tracker=a;return this}return j.tracker},title:function(a){if(a!==undefined){a=I(a);D(function(){fa=l.title=a;if(ca&&k&&k.contentWindow&&k.contentWindow.document){k.contentWindow.document.title=a;ca=i}if(!P&&aa)d.replace(d.href.indexOf("#")!=
--1?d.href:d.href+"#");P=i},50);return this}return l.title},value:function(a){if(a!==undefined){a=T(I(V(a,e)));if(a=="/")a="";if(g==a&&!M)return;P=e;g=a;if(j.autoUpdate||M){K=e;F(e);w[E.length]=g;if(B)if(j.history){d[q][d.pathname]=w.toString();C=E.length+1;if(m<418){if(d.search==""){N.action="#"+t(g,e);N.submit()}}else if(m<523||g==""){a=l.createEvent("MouseEvents");a.initEvent("click",e,e);var b=l.createElement("a");b.href="#"+t(g,e);b.dispatchEvent(a)}else d.hash="#"+t(g,e)}else d.replace("#"+t(g,
-e));else if(g!=s())if(j.history)d.hash="#"+J(t(g,e),e);else d.replace("#"+t(g,e));u&&m<8&&j.history&&D(Y,50);if(B)D(function(){K=i},1);else K=i}return this}if(!O)return null;return I(V(J(g,i),i))},path:function(a){if(a!==undefined){var b=this.queryString();this.value(a+(b?"?"+b:""));return this}a=this.value();return a.indexOf("?")!=-1?a.split("?")[0]:a},queryString:function(a){if(a!==undefined){this.value(this.path()+(a?"?"+a:""));return this}a=this.value();var b=a.indexOf("?");if(b!=-1&&b<a.length)return a.substr(b+
-1)},parameter:function(a,b,h){var f,p;if(b!==undefined){var Q=this.parameterNames();p=[];for(f=0;f<Q.length;f++){var R=Q[f],z=this.parameter(R);if(typeof z=="string")z=[z];if(R==a)z=b===null||b==""?[]:h?z.concat([b]):[b];for(var S=0;S<z.length;S++)p.push(R+"="+z[S])}c.inArray(a,Q)==-1&&p.push(a+"="+b);this.queryString(p.join("&"));return this}b=this.value();f=b.indexOf("?");if(f!=-1){b=b.substr(f+1);p=b.split("&");b=[];for(f=0;f<p.length;f++){h=p[f].split("=");h[0]==a&&b.push(h[1])}if(b.length!==
-0)return b.length!=1?b:b[0]}},pathNames:function(){var a=this.path(),b=a.split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.value(),b=a.indexOf("?"),h=[];if(b!=-1){a=a.substr(b+1);if(a!=""&&a.indexOf("=")!=-1){a=a.split("&");for(b=0;b<a.length;b++){var f=a[b].split("=")[0];c.inArray(f,h)==-1&&h.push(f)}}}return h}}}();c.fn.address=function(A){var v=function(){var s=A?A.call(this):/address:/.test(c(this).attr("rel"))?
-c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(s);return false};c(this).click(v).live("click",v)}})(jQuery);
+T(I(t(d.href.substr(a+1),j))):""},U=function(){return"javascript"},V=function(a,b){if(i.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){if(i.crawlable)return b?(a!=""?"!":"")+a:a.replace(/^\!/,"");return a},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=
+s(),b=g!=a;if(B&&m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(j)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(j)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[i.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==
+L)pageTracker._trackPageview(a);else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0";k.src=U()+":"+j;k.noResize=e;k.frameBorder=k.frameSpacing=0}else{k.src=
+U()+":"+j;k.style.display="none";l.body.insertAdjacentElement("afterBegin",k)}D(function(){c(k).bind("load",function(){var b=k.contentWindow;g=typeof b[q]!=x?b[q]:"";if(g!=s()){F(j);d.hash=J(t(g,e),e)}});typeof k.contentWindow[q]==x&&Y()},50)}else if(B){if(m<418){c(l.body).append('<form id="'+q+'" style="position:absolute;top:-9999px;" method="get"></form>');N=l.getElementById(q)}if(typeof d[q]==x)d[q]={};if(typeof d[q][d.pathname]!=x)w=d[q][d.pathname].split(",")}D(function(){A("init");F(j)},1);
+if(u&&m>7||!u&&"on"+H in o)if(o.addEventListener)o.addEventListener(H,G,false);else o.attachEvent&&o.attachEvent("on"+H,G);else da(G,50);c("a[rel*=address:]").address()}},ea=function(){if(o.removeEventListener)o.removeEventListener(H,G,false);else o.detachEvent&&o.detachEvent("on"+H,G)},q="jQueryAddress",L="function",x="undefined",H="hashchange",e=true,j=false,i={autoUpdate:e,crawlable:e,history:e,strict:e},n=c.browser,m=parseFloat(c.browser.version),aa=n.mozilla,u=n.msie,r=n.opera,B=n.safari,O=j,
+o=function(){try{return top.document!==undefined?top:window}catch(a){return window}}(),l=o.document,E=o.history,d=o.location,da=setInterval,D=setTimeout,I=decodeURI,T=encodeURI;n=navigator.userAgent;var k,N,y=W(document),ba=y?y.indexOf("?"):-1,fa=l.title,C=E.length,K=j,Z=j,P=e,ca=e,M=j,w=[],g=s();if(u){m=parseFloat(n.substr(n.indexOf("MSIE")+4));if(l.documentMode&&l.documentMode!=m)m=l.documentMode!=8?7:8}if(O=aa&&m>=1||u&&m>=6||r&&m>=9.5||B&&m>=312){for(n=1;n<C;n++)w.push("");w.push(g);if(u&&d.hash!=
+g)d.hash="#"+J(t(g,e),e);if(r)history.navigationMode="compatible";if(y&&ba!=-1){y=y.substr(ba+1).split("&");for(n=0;n<y.length;n++){r=y[n].split("=");if(/^(autoUpdate|crawlable|history|strict)$/.test(r[0]))i[r[0]]=isNaN(r[1])?/^(true|yes)$/i.test(r[1]):parseInt(r[1],10)!==0;if(/^tracker$/.test(r[0]))i[r[0]]=r[1]}}document.readyState=="complete"&&$();c($);c(window).bind("unload",ea)}else if(!O&&s()!=""||B&&m<418&&s()!=""&&d.search!=""){l.open();l.write('<html><head><meta http-equiv="refresh" content="0;url='+
+d.href.substr(0,d.href.indexOf("#"))+'" /></head></html>');l.close()}else X();return{init:function(a,b){return v("init",a,b)},change:function(a,b){return v("change",a,b)},internalChange:function(a,b){return v("internalChange",a,b)},externalChange:function(a,b){return v("externalChange",a,b)},baseURL:function(){var a=d.href;if(s()!="")a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},strict:function(a){if(a!==undefined){i.strict=a;return this}return i.strict},crawlable:function(a){if(a!==
+undefined){i.crawlable=a;return this}return i.crawlable},autoUpdate:function(a){if(a!==undefined){i.autoUpdate=a;return this}return i.autoUpdate},update:function(){M=e;this.value(g);M=j;return this},history:function(a){if(a!==undefined){i.history=a;return this}return i.history},tracker:function(a){if(a!==undefined){i.tracker=a;return this}return i.tracker},title:function(a){if(a!==undefined){a=I(a);D(function(){fa=l.title=a;if(ca&&k&&k.contentWindow&&k.contentWindow.document){k.contentWindow.document.title=
+a;ca=j}if(!P&&aa)d.replace(d.href.indexOf("#")!=-1?d.href:d.href+"#");P=j},50);return this}return l.title},value:function(a){if(a!==undefined){a=T(I(V(a,e)));if(a=="/")a="";if(g==a&&!M)return;P=e;g=a;if(i.autoUpdate||M){K=e;F(e);w[E.length]=g;if(B)if(i.history){d[q][d.pathname]=w.toString();C=E.length+1;if(m<418){if(d.search==""){N.action="#"+t(g,e);N.submit()}}else if(m<523||g==""){a=l.createEvent("MouseEvents");a.initEvent("click",e,e);var b=l.createElement("a");b.href="#"+t(g,e);b.dispatchEvent(a)}else d.hash=
+"#"+t(g,e)}else d.replace("#"+t(g,e));else if(g!=s())if(i.history)d.hash="#"+J(t(g,e),e);else d.replace("#"+t(g,e));u&&m<8&&i.history&&D(Y,50);if(B)D(function(){K=j},1);else K=j}return this}if(!O)return null;return I(V(J(g,j),j))},path:function(a){if(a!==undefined){var b=this.queryString();this.value(a+(b?"?"+b:""));return this}a=this.value();return a.indexOf("?")!=-1?a.split("?")[0]:a},queryString:function(a){if(a!==undefined){this.value(this.path()+(a?"?"+a:""));return this}a=this.value();var b=
+a.indexOf("?");if(b!=-1&&b<a.length)return a.substr(b+1)},parameter:function(a,b,h){var f,p;if(b!==undefined){var Q=this.parameterNames();p=[];for(f=0;f<Q.length;f++){var R=Q[f],z=this.parameter(R);if(typeof z=="string")z=[z];if(R==a)z=b===null||b==""?[]:h?z.concat([b]):[b];for(var S=0;S<z.length;S++)p.push(R+"="+z[S])}c.inArray(a,Q)==-1&&p.push(a+"="+b);this.queryString(p.join("&"));return this}b=this.value();f=b.indexOf("?");if(f!=-1){b=b.substr(f+1);p=b.split("&");b=[];for(f=0;f<p.length;f++){h=
+p[f].split("=");h[0]==a&&b.push(h[1])}if(b.length!==0)return b.length!=1?b:b[0]}},pathNames:function(){var a=this.path(),b=a.split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.value(),b=a.indexOf("?"),h=[];if(b!=-1){a=a.substr(b+1);if(a!=""&&a.indexOf("=")!=-1){a=a.split("&");for(b=0;b<a.length;b++){var f=a[b].split("=")[0];c.inArray(f,h)==-1&&h.push(f)}}}return h}}}();c.fn.address=function(A){var v=
+function(){var s=A?A.call(this):/address:/.test(c(this).attr("rel"))?c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(s);return false};c(this).click(v).live("click",v)}})(jQuery);
View
4 samples/api/index.html
@@ -5,7 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link type="text/css" href="styles.css" rel="stylesheet">
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
- <script type="text/javascript" src="jquery.address-1.2.min.js"></script>
+ <script type="text/javascript" src="jquery.address-1.2.min.js?crawlable=false"></script>
<script type="text/javascript">
// Document title
@@ -14,7 +14,7 @@
// Simple log
var log = function(msg) {
if (!$('.log').length) {
- $('<div class="log" />').appendTo('.content');
+ $('<div class="log" />').appendTo('.page');
}
$('.log').append(msg.replace(/^([^:]*):(.*)$/, '<p><b>$1:</b> <span class="$1">$2</span></p>'))
.attr({scrollTop: $('.log').attr('scrollHeight')})
View
30 samples/api/jquery.address-1.2.min.js
@@ -6,20 +6,20 @@
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
- * Date: 2010-03-19 09:31:48 +0200 (Fri, 19 Mar 2010)
+ * Date: 2010-03-20 21:26:11 +0200 (Sat, 20 Mar 2010)
*/
(function(c){c.address=function(){var A=function(a){c(c.address).trigger(c.extend(c.Event(a),function(){for(var b={},h=c.address.parameterNames(),f=0,p=h.length;f<p;f++)b[h[f]]=c.address.parameter(h[f]);return{value:c.address.value(),path:c.address.path(),pathNames:c.address.pathNames(),parameterNames:h,parameters:b,queryString:c.address.queryString()}}.call(c.address)))},v=function(a,b,h){if(h||b)c(c.address).bind(a,h||b,h&&b);return c.address},s=function(){var a=d.href.indexOf("#");return a!=-1?
-T(I(t(d.href.substr(a+1),i))):""},U=function(){return"javascript"},V=function(a,b){if(j.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){return b?(a!=""?"!":"")+a:a.replace(/^\!/,"")},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=s(),b=g!=a;if(B&&
-m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(i)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(i)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[j.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==L)pageTracker._trackPageview(a);
-else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0";k.src=U()+":"+i;k.noResize=e;k.frameBorder=k.frameSpacing=0}else{k.src=U()+":"+i;k.style.display=
-"none";l.body.insertAdjacentElement("afterBegin",k)}D(function(){c(k).bind("load",function(){var b=k.contentWindow;g=typeof b[q]!=x?b[q]:"";if(g!=s()){F(i);d.hash=J(t(g,e),e)}});typeof k.contentWindow[q]==x&&Y()},50)}else if(B){if(m<418){c(l.body).append('<form id="'+q+'" style="position:absolute;top:-9999px;" method="get"></form>');N=l.getElementById(q)}if(typeof d[q]==x)d[q]={};if(typeof d[q][d.pathname]!=x)w=d[q][d.pathname].split(",")}D(function(){A("init");F(i)},1);if(u&&m>7||!u&&"on"+H in o)if(o.addEventListener)o.addEventListener(H,
-G,false);else o.attachEvent&&o.attachEvent("on"+H,G);else da(G,50);c("a[rel*=address:]").address()}},ea=function(){if(o.removeEventListener)o.removeEventListener(H,G,false);else o.detachEvent&&o.detachEvent("on"+H,G)},q="jQueryAddress",L="function",x="undefined",H="hashchange",e=true,i=false,n=c.browser,m=parseFloat(c.browser.version),aa=n.mozilla,u=n.msie,r=n.opera,B=n.safari,O=i,o=function(){try{return top.document!==undefined?top:window}catch(a){return window}}(),l=o.document,E=o.history,d=o.location,
-da=setInterval,D=setTimeout,I=decodeURI,T=encodeURI;n=navigator.userAgent;var k,N,y=W(document),ba=y?y.indexOf("?"):-1,fa=l.title,C=E.length,K=i,Z=i,P=e,ca=e,M=i,w=[],g=s(),j={autoUpdate:e,crawlable:e,history:e,strict:e};if(u){m=parseFloat(n.substr(n.indexOf("MSIE")+4));if(l.documentMode&&l.documentMode!=m)m=l.documentMode!=8?7:8}if(O=aa&&m>=1||u&&m>=6||r&&m>=9.5||B&&m>=312){for(n=1;n<C;n++)w.push("");w.push(g);if(u&&d.hash!=g)d.hash="#"+J(t(g,e),e);if(r)history.navigationMode="compatible";if(y&&
-ba!=-1){y=y.substr(ba+1).split("&");for(n=0;n<y.length;n++){r=y[n].split("=");if(/^(autoUpdate|crawlable|history|strict)$/.test(r[0]))j[r[0]]=isNaN(r[1])?/^(true|yes)$/i.test(r[1]):parseInt(r[1],10)!==0;if(/^tracker$/.test(r[0]))j[r[0]]=r[1]}}document.readyState=="complete"&&$();c($);c(window).bind("unload",ea)}else if(!O&&s()!=""||B&&m<418&&s()!=""&&d.search!=""){l.open();l.write('<html><head><meta http-equiv="refresh" content="0;url='+d.href.substr(0,d.href.indexOf("#"))+'" /></head></html>');l.close()}else X();
-return{init:function(a,b){return v("init",a,b)},change:function(a,b){return v("change",a,b)},internalChange:function(a,b){return v("internalChange",a,b)},externalChange:function(a,b){return v("externalChange",a,b)},baseURL:function(){var a=d.href;if(s()!="")a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},strict:function(a){if(a!==undefined){j.strict=a;return this}return j.strict},crawlable:function(a){if(a!==undefined){j.crawlable=a;return this}return j.crawlable},
-autoUpdate:function(a){if(a!==undefined){j.autoUpdate=a;return this}return j.autoUpdate},update:function(){M=e;this.value(g);M=i;return this},history:function(a){if(a!==undefined){j.history=a;return this}return j.history},tracker:function(a){if(a!==undefined){j.tracker=a;return this}return j.tracker},title:function(a){if(a!==undefined){a=I(a);D(function(){fa=l.title=a;if(ca&&k&&k.contentWindow&&k.contentWindow.document){k.contentWindow.document.title=a;ca=i}if(!P&&aa)d.replace(d.href.indexOf("#")!=
--1?d.href:d.href+"#");P=i},50);return this}return l.title},value:function(a){if(a!==undefined){a=T(I(V(a,e)));if(a=="/")a="";if(g==a&&!M)return;P=e;g=a;if(j.autoUpdate||M){K=e;F(e);w[E.length]=g;if(B)if(j.history){d[q][d.pathname]=w.toString();C=E.length+1;if(m<418){if(d.search==""){N.action="#"+t(g,e);N.submit()}}else if(m<523||g==""){a=l.createEvent("MouseEvents");a.initEvent("click",e,e);var b=l.createElement("a");b.href="#"+t(g,e);b.dispatchEvent(a)}else d.hash="#"+t(g,e)}else d.replace("#"+t(g,
-e));else if(g!=s())if(j.history)d.hash="#"+J(t(g,e),e);else d.replace("#"+t(g,e));u&&m<8&&j.history&&D(Y,50);if(B)D(function(){K=i},1);else K=i}return this}if(!O)return null;return I(V(J(g,i),i))},path:function(a){if(a!==undefined){var b=this.queryString();this.value(a+(b?"?"+b:""));return this}a=this.value();return a.indexOf("?")!=-1?a.split("?")[0]:a},queryString:function(a){if(a!==undefined){this.value(this.path()+(a?"?"+a:""));return this}a=this.value();var b=a.indexOf("?");if(b!=-1&&b<a.length)return a.substr(b+
-1)},parameter:function(a,b,h){var f,p;if(b!==undefined){var Q=this.parameterNames();p=[];for(f=0;f<Q.length;f++){var R=Q[f],z=this.parameter(R);if(typeof z=="string")z=[z];if(R==a)z=b===null||b==""?[]:h?z.concat([b]):[b];for(var S=0;S<z.length;S++)p.push(R+"="+z[S])}c.inArray(a,Q)==-1&&p.push(a+"="+b);this.queryString(p.join("&"));return this}b=this.value();f=b.indexOf("?");if(f!=-1){b=b.substr(f+1);p=b.split("&");b=[];for(f=0;f<p.length;f++){h=p[f].split("=");h[0]==a&&b.push(h[1])}if(b.length!==
-0)return b.length!=1?b:b[0]}},pathNames:function(){var a=this.path(),b=a.split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.value(),b=a.indexOf("?"),h=[];if(b!=-1){a=a.substr(b+1);if(a!=""&&a.indexOf("=")!=-1){a=a.split("&");for(b=0;b<a.length;b++){var f=a[b].split("=")[0];c.inArray(f,h)==-1&&h.push(f)}}}return h}}}();c.fn.address=function(A){var v=function(){var s=A?A.call(this):/address:/.test(c(this).attr("rel"))?
-c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(s);return false};c(this).click(v).live("click",v)}})(jQuery);
+T(I(t(d.href.substr(a+1),j))):""},U=function(){return"javascript"},V=function(a,b){if(i.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){if(i.crawlable)return b?(a!=""?"!":"")+a:a.replace(/^\!/,"");return a},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=
+s(),b=g!=a;if(B&&m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(j)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(j)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[i.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==
+L)pageTracker._trackPageview(a);else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0";k.src=U()+":"+j;k.noResize=e;k.frameBorder=k.frameSpacing=0}else{k.src=
+U()+":"+j;k.style.display="none";l.body.insertAdjacentElement("afterBegin",k)}D(function(){c(k).bind("load",function(){var b=k.contentWindow;g=typeof b[q]!=x?b[q]:"";if(g!=s()){F(j);d.hash=J(t(g,e),e)}});typeof k.contentWindow[q]==x&&Y()},50)}else if(B){if(m<418){c(l.body).append('<form id="'+q+'" style="position:absolute;top:-9999px;" method="get"></form>');N=l.getElementById(q)}if(typeof d[q]==x)d[q]={};if(typeof d[q][d.pathname]!=x)w=d[q][d.pathname].split(",")}D(function(){A("init");F(j)},1);
+if(u&&m>7||!u&&"on"+H in o)if(o.addEventListener)o.addEventListener(H,G,false);else o.attachEvent&&o.attachEvent("on"+H,G);else da(G,50);c("a[rel*=address:]").address()}},ea=function(){if(o.removeEventListener)o.removeEventListener(H,G,false);else o.detachEvent&&o.detachEvent("on"+H,G)},q="jQueryAddress",L="function",x="undefined",H="hashchange",e=true,j=false,i={autoUpdate:e,crawlable:e,history:e,strict:e},n=c.browser,m=parseFloat(c.browser.version),aa=n.mozilla,u=n.msie,r=n.opera,B=n.safari,O=j,
+o=function(){try{return top.document!==undefined?top:window}catch(a){return window}}(),l=o.document,E=o.history,d=o.location,da=setInterval,D=setTimeout,I=decodeURI,T=encodeURI;n=navigator.userAgent;var k,N,y=W(document),ba=y?y.indexOf("?"):-1,fa=l.title,C=E.length,K=j,Z=j,P=e,ca=e,M=j,w=[],g=s();if(u){m=parseFloat(n.substr(n.indexOf("MSIE")+4));if(l.documentMode&&l.documentMode!=m)m=l.documentMode!=8?7:8}if(O=aa&&m>=1||u&&m>=6||r&&m>=9.5||B&&m>=312){for(n=1;n<C;n++)w.push("");w.push(g);if(u&&d.hash!=
+g)d.hash="#"+J(t(g,e),e);if(r)history.navigationMode="compatible";if(y&&ba!=-1){y=y.substr(ba+1).split("&");for(n=0;n<y.length;n++){r=y[n].split("=");if(/^(autoUpdate|crawlable|history|strict)$/.test(r[0]))i[r[0]]=isNaN(r[1])?/^(true|yes)$/i.test(r[1]):parseInt(r[1],10)!==0;if(/^tracker$/.test(r[0]))i[r[0]]=r[1]}}document.readyState=="complete"&&$();c($);c(window).bind("unload",ea)}else if(!O&&s()!=""||B&&m<418&&s()!=""&&d.search!=""){l.open();l.write('<html><head><meta http-equiv="refresh" content="0;url='+
+d.href.substr(0,d.href.indexOf("#"))+'" /></head></html>');l.close()}else X();return{init:function(a,b){return v("init",a,b)},change:function(a,b){return v("change",a,b)},internalChange:function(a,b){return v("internalChange",a,b)},externalChange:function(a,b){return v("externalChange",a,b)},baseURL:function(){var a=d.href;if(s()!="")a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},strict:function(a){if(a!==undefined){i.strict=a;return this}return i.strict},crawlable:function(a){if(a!==
+undefined){i.crawlable=a;return this}return i.crawlable},autoUpdate:function(a){if(a!==undefined){i.autoUpdate=a;return this}return i.autoUpdate},update:function(){M=e;this.value(g);M=j;return this},history:function(a){if(a!==undefined){i.history=a;return this}return i.history},tracker:function(a){if(a!==undefined){i.tracker=a;return this}return i.tracker},title:function(a){if(a!==undefined){a=I(a);D(function(){fa=l.title=a;if(ca&&k&&k.contentWindow&&k.contentWindow.document){k.contentWindow.document.title=
+a;ca=j}if(!P&&aa)d.replace(d.href.indexOf("#")!=-1?d.href:d.href+"#");P=j},50);return this}return l.title},value:function(a){if(a!==undefined){a=T(I(V(a,e)));if(a=="/")a="";if(g==a&&!M)return;P=e;g=a;if(i.autoUpdate||M){K=e;F(e);w[E.length]=g;if(B)if(i.history){d[q][d.pathname]=w.toString();C=E.length+1;if(m<418){if(d.search==""){N.action="#"+t(g,e);N.submit()}}else if(m<523||g==""){a=l.createEvent("MouseEvents");a.initEvent("click",e,e);var b=l.createElement("a");b.href="#"+t(g,e);b.dispatchEvent(a)}else d.hash=
+"#"+t(g,e)}else d.replace("#"+t(g,e));else if(g!=s())if(i.history)d.hash="#"+J(t(g,e),e);else d.replace("#"+t(g,e));u&&m<8&&i.history&&D(Y,50);if(B)D(function(){K=j},1);else K=j}return this}if(!O)return null;return I(V(J(g,j),j))},path:function(a){if(a!==undefined){var b=this.queryString();this.value(a+(b?"?"+b:""));return this}a=this.value();return a.indexOf("?")!=-1?a.split("?")[0]:a},queryString:function(a){if(a!==undefined){this.value(this.path()+(a?"?"+a:""));return this}a=this.value();var b=
+a.indexOf("?");if(b!=-1&&b<a.length)return a.substr(b+1)},parameter:function(a,b,h){var f,p;if(b!==undefined){var Q=this.parameterNames();p=[];for(f=0;f<Q.length;f++){var R=Q[f],z=this.parameter(R);if(typeof z=="string")z=[z];if(R==a)z=b===null||b==""?[]:h?z.concat([b]):[b];for(var S=0;S<z.length;S++)p.push(R+"="+z[S])}c.inArray(a,Q)==-1&&p.push(a+"="+b);this.queryString(p.join("&"));return this}b=this.value();f=b.indexOf("?");if(f!=-1){b=b.substr(f+1);p=b.split("&");b=[];for(f=0;f<p.length;f++){h=
+p[f].split("=");h[0]==a&&b.push(h[1])}if(b.length!==0)return b.length!=1?b:b[0]}},pathNames:function(){var a=this.path(),b=a.split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.value(),b=a.indexOf("?"),h=[];if(b!=-1){a=a.substr(b+1);if(a!=""&&a.indexOf("=")!=-1){a=a.split("&");for(b=0;b<a.length;b++){var f=a[b].split("=")[0];c.inArray(f,h)==-1&&h.push(f)}}}return h}}}();c.fn.address=function(A){var v=
+function(){var s=A?A.call(this):/address:/.test(c(this).attr("rel"))?c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(s);return false};c(this).click(v).live("click",v)}})(jQuery);
View
30 samples/crawling/jquery.address-1.2.min.js
@@ -6,20 +6,20 @@
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
- * Date: 2010-03-19 09:31:48 +0200 (Fri, 19 Mar 2010)
+ * Date: 2010-03-20 21:26:11 +0200 (Sat, 20 Mar 2010)
*/
(function(c){c.address=function(){var A=function(a){c(c.address).trigger(c.extend(c.Event(a),function(){for(var b={},h=c.address.parameterNames(),f=0,p=h.length;f<p;f++)b[h[f]]=c.address.parameter(h[f]);return{value:c.address.value(),path:c.address.path(),pathNames:c.address.pathNames(),parameterNames:h,parameters:b,queryString:c.address.queryString()}}.call(c.address)))},v=function(a,b,h){if(h||b)c(c.address).bind(a,h||b,h&&b);return c.address},s=function(){var a=d.href.indexOf("#");return a!=-1?
-T(I(t(d.href.substr(a+1),i))):""},U=function(){return"javascript"},V=function(a,b){if(j.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){return b?(a!=""?"!":"")+a:a.replace(/^\!/,"")},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=s(),b=g!=a;if(B&&
-m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(i)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(i)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[j.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==L)pageTracker._trackPageview(a);
-else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0";k.src=U()+":"+i;k.noResize=e;k.frameBorder=k.frameSpacing=0}else{k.src=U()+":"+i;k.style.display=
-"none";l.body.insertAdjacentElement("afterBegin",k)}D(function(){c(k).bind("load",function(){var b=k.contentWindow;g=typeof b[q]!=x?b[q]:"";if(g!=s()){F(i);d.hash=J(t(g,e),e)}});typeof k.contentWindow[q]==x&&Y()},50)}else if(B){if(m<418){c(l.body).append('<form id="'+q+'" style="position:absolute;top:-9999px;" method="get"></form>');N=l.getElementById(q)}if(typeof d[q]==x)d[q]={};if(typeof d[q][d.pathname]!=x)w=d[q][d.pathname].split(",")}D(function(){A("init");F(i)},1);if(u&&m>7||!u&&"on"+H in o)if(o.addEventListener)o.addEventListener(H,
-G,false);else o.attachEvent&&o.attachEvent("on"+H,G);else da(G,50);c("a[rel*=address:]").address()}},ea=function(){if(o.removeEventListener)o.removeEventListener(H,G,false);else o.detachEvent&&o.detachEvent("on"+H,G)},q="jQueryAddress",L="function",x="undefined",H="hashchange",e=true,i=false,n=c.browser,m=parseFloat(c.browser.version),aa=n.mozilla,u=n.msie,r=n.opera,B=n.safari,O=i,o=function(){try{return top.document!==undefined?top:window}catch(a){return window}}(),l=o.document,E=o.history,d=o.location,
-da=setInterval,D=setTimeout,I=decodeURI,T=encodeURI;n=navigator.userAgent;var k,N,y=W(document),ba=y?y.indexOf("?"):-1,fa=l.title,C=E.length,K=i,Z=i,P=e,ca=e,M=i,w=[],g=s(),j={autoUpdate:e,crawlable:e,history:e,strict:e};if(u){m=parseFloat(n.substr(n.indexOf("MSIE")+4));if(l.documentMode&&l.documentMode!=m)m=l.documentMode!=8?7:8}if(O=aa&&m>=1||u&&m>=6||r&&m>=9.5||B&&m>=312){for(n=1;n<C;n++)w.push("");w.push(g);if(u&&d.hash!=g)d.hash="#"+J(t(g,e),e);if(r)history.navigationMode="compatible";if(y&&
-ba!=-1){y=y.substr(ba+1).split("&");for(n=0;n<y.length;n++){r=y[n].split("=");if(/^(autoUpdate|crawlable|history|strict)$/.test(r[0]))j[r[0]]=isNaN(r[1])?/^(true|yes)$/i.test(r[1]):parseInt(r[1],10)!==0;if(/^tracker$/.test(r[0]))j[r[0]]=r[1]}}document.readyState=="complete"&&$();c($);c(window).bind("unload",ea)}else if(!O&&s()!=""||B&&m<418&&s()!=""&&d.search!=""){l.open();l.write('<html><head><meta http-equiv="refresh" content="0;url='+d.href.substr(0,d.href.indexOf("#"))+'" /></head></html>');l.close()}else X();
-return{init:function(a,b){return v("init",a,b)},change:function(a,b){return v("change",a,b)},internalChange:function(a,b){return v("internalChange",a,b)},externalChange:function(a,b){return v("externalChange",a,b)},baseURL:function(){var a=d.href;if(s()!="")a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},strict:function(a){if(a!==undefined){j.strict=a;return this}return j.strict},crawlable:function(a){if(a!==undefined){j.crawlable=a;return this}return j.crawlable},
-autoUpdate:function(a){if(a!==undefined){j.autoUpdate=a;return this}return j.autoUpdate},update:function(){M=e;this.value(g);M=i;return this},history:function(a){if(a!==undefined){j.history=a;return this}return j.history},tracker:function(a){if(a!==undefined){j.tracker=a;return this}return j.tracker},title:function(a){if(a!==undefined){a=I(a);D(function(){fa=l.title=a;if(ca&&k&&k.contentWindow&&k.contentWindow.document){k.contentWindow.document.title=a;ca=i}if(!P&&aa)d.replace(d.href.indexOf("#")!=
--1?d.href:d.href+"#");P=i},50);return this}return l.title},value:function(a){if(a!==undefined){a=T(I(V(a,e)));if(a=="/")a="";if(g==a&&!M)return;P=e;g=a;if(j.autoUpdate||M){K=e;F(e);w[E.length]=g;if(B)if(j.history){d[q][d.pathname]=w.toString();C=E.length+1;if(m<418){if(d.search==""){N.action="#"+t(g,e);N.submit()}}else if(m<523||g==""){a=l.createEvent("MouseEvents");a.initEvent("click",e,e);var b=l.createElement("a");b.href="#"+t(g,e);b.dispatchEvent(a)}else d.hash="#"+t(g,e)}else d.replace("#"+t(g,
-e));else if(g!=s())if(j.history)d.hash="#"+J(t(g,e),e);else d.replace("#"+t(g,e));u&&m<8&&j.history&&D(Y,50);if(B)D(function(){K=i},1);else K=i}return this}if(!O)return null;return I(V(J(g,i),i))},path:function(a){if(a!==undefined){var b=this.queryString();this.value(a+(b?"?"+b:""));return this}a=this.value();return a.indexOf("?")!=-1?a.split("?")[0]:a},queryString:function(a){if(a!==undefined){this.value(this.path()+(a?"?"+a:""));return this}a=this.value();var b=a.indexOf("?");if(b!=-1&&b<a.length)return a.substr(b+
-1)},parameter:function(a,b,h){var f,p;if(b!==undefined){var Q=this.parameterNames();p=[];for(f=0;f<Q.length;f++){var R=Q[f],z=this.parameter(R);if(typeof z=="string")z=[z];if(R==a)z=b===null||b==""?[]:h?z.concat([b]):[b];for(var S=0;S<z.length;S++)p.push(R+"="+z[S])}c.inArray(a,Q)==-1&&p.push(a+"="+b);this.queryString(p.join("&"));return this}b=this.value();f=b.indexOf("?");if(f!=-1){b=b.substr(f+1);p=b.split("&");b=[];for(f=0;f<p.length;f++){h=p[f].split("=");h[0]==a&&b.push(h[1])}if(b.length!==
-0)return b.length!=1?b:b[0]}},pathNames:function(){var a=this.path(),b=a.split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.value(),b=a.indexOf("?"),h=[];if(b!=-1){a=a.substr(b+1);if(a!=""&&a.indexOf("=")!=-1){a=a.split("&");for(b=0;b<a.length;b++){var f=a[b].split("=")[0];c.inArray(f,h)==-1&&h.push(f)}}}return h}}}();c.fn.address=function(A){var v=function(){var s=A?A.call(this):/address:/.test(c(this).attr("rel"))?
-c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(s);return false};c(this).click(v).live("click",v)}})(jQuery);
+T(I(t(d.href.substr(a+1),j))):""},U=function(){return"javascript"},V=function(a,b){if(i.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){if(i.crawlable)return b?(a!=""?"!":"")+a:a.replace(/^\!/,"");return a},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=
+s(),b=g!=a;if(B&&m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(j)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(j)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[i.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==
+L)pageTracker._trackPageview(a);else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0";k.src=U()+":"+j;k.noResize=e;k.frameBorder=k.frameSpacing=0}else{k.src=
+U()+":"+j;k.style.display="none";l.body.insertAdjacentElement("afterBegin",k)}D(function(){c(k).bind("load",function(){var b=k.contentWindow;g=typeof b[q]!=x?b[q]:"";if(g!=s()){F(j);d.hash=J(t(g,e),e)}});typeof k.contentWindow[q]==x&&Y()},50)}else if(B){if(m<418){c(l.body).append('<form id="'+q+'" style="position:absolute;top:-9999px;" method="get"></form>');N=l.getElementById(q)}if(typeof d[q]==x)d[q]={};if(typeof d[q][d.pathname]!=x)w=d[q][d.pathname].split(",")}D(function(){A("init");F(j)},1);
+if(u&&m>7||!u&&"on"+H in o)if(o.addEventListener)o.addEventListener(H,G,false);else o.attachEvent&&o.attachEvent("on"+H,G);else da(G,50);c("a[rel*=address:]").address()}},ea=function(){if(o.removeEventListener)o.removeEventListener(H,G,false);else o.detachEvent&&o.detachEvent("on"+H,G)},q="jQueryAddress",L="function",x="undefined",H="hashchange",e=true,j=false,i={autoUpdate:e,crawlable:e,history:e,strict:e},n=c.browser,m=parseFloat(c.browser.version),aa=n.mozilla,u=n.msie,r=n.opera,B=n.safari,O=j,
+o=function(){try{return top.document!==undefined?top:window}catch(a){return window}}(),l=o.document,E=o.history,d=o.location,da=setInterval,D=setTimeout,I=decodeURI,T=encodeURI;n=navigator.userAgent;var k,N,y=W(document),ba=y?y.indexOf("?"):-1,fa=l.title,C=E.length,K=j,Z=j,P=e,ca=e,M=j,w=[],g=s();if(u){m=parseFloat(n.substr(n.indexOf("MSIE")+4));if(l.documentMode&&l.documentMode!=m)m=l.documentMode!=8?7:8}if(O=aa&&m>=1||u&&m>=6||r&&m>=9.5||B&&m>=312){for(n=1;n<C;n++)w.push("");w.push(g);if(u&&d.hash!=
+g)d.hash="#"+J(t(g,e),e);if(r)history.navigationMode="compatible";if(y&&ba!=-1){y=y.substr(ba+1).split("&");for(n=0;n<y.length;n++){r=y[n].split("=");if(/^(autoUpdate|crawlable|history|strict)$/.test(r[0]))i[r[0]]=isNaN(r[1])?/^(true|yes)$/i.test(r[1]):parseInt(r[1],10)!==0;if(/^tracker$/.test(r[0]))i[r[0]]=r[1]}}document.readyState=="complete"&&$();c($);c(window).bind("unload",ea)}else if(!O&&s()!=""||B&&m<418&&s()!=""&&d.search!=""){l.open();l.write('<html><head><meta http-equiv="refresh" content="0;url='+
+d.href.substr(0,d.href.indexOf("#"))+'" /></head></html>');l.close()}else X();return{init:function(a,b){return v("init",a,b)},change:function(a,b){return v("change",a,b)},internalChange:function(a,b){return v("internalChange",a,b)},externalChange:function(a,b){return v("externalChange",a,b)},baseURL:function(){var a=d.href;if(s()!="")a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},strict:function(a){if(a!==undefined){i.strict=a;return this}return i.strict},crawlable:function(a){if(a!==
+undefined){i.crawlable=a;return this}return i.crawlable},autoUpdate:function(a){if(a!==undefined){i.autoUpdate=a;return this}return i.autoUpdate},update:function(){M=e;this.value(g);M=j;return this},history:function(a){if(a!==undefined){i.history=a;return this}return i.history},tracker:function(a){if(a!==undefined){i.tracker=a;return this}return i.tracker},title:function(a){if(a!==undefined){a=I(a);D(function(){fa=l.title=a;if(ca&&k&&k.contentWindow&&k.contentWindow.document){k.contentWindow.document.title=
+a;ca=j}if(!P&&aa)d.replace(d.href.indexOf("#")!=-1?d.href:d.href+"#");P=j},50);return this}return l.title},value:function(a){if(a!==undefined){a=T(I(V(a,e)));if(a=="/")a="";if(g==a&&!M)return;P=e;g=a;if(i.autoUpdate||M){K=e;F(e);w[E.length]=g;if(B)if(i.history){d[q][d.pathname]=w.toString();C=E.length+1;if(m<418){if(d.search==""){N.action="#"+t(g,e);N.submit()}}else if(m<523||g==""){a=l.createEvent("MouseEvents");a.initEvent("click",e,e);var b=l.createElement("a");b.href="#"+t(g,e);b.dispatchEvent(a)}else d.hash=
+"#"+t(g,e)}else d.replace("#"+t(g,e));else if(g!=s())if(i.history)d.hash="#"+J(t(g,e),e);else d.replace("#"+t(g,e));u&&m<8&&i.history&&D(Y,50);if(B)D(function(){K=j},1);else K=j}return this}if(!O)return null;return I(V(J(g,j),j))},path:function(a){if(a!==undefined){var b=this.queryString();this.value(a+(b?"?"+b:""));return this}a=this.value();return a.indexOf("?")!=-1?a.split("?")[0]:a},queryString:function(a){if(a!==undefined){this.value(this.path()+(a?"?"+a:""));return this}a=this.value();var b=
+a.indexOf("?");if(b!=-1&&b<a.length)return a.substr(b+1)},parameter:function(a,b,h){var f,p;if(b!==undefined){var Q=this.parameterNames();p=[];for(f=0;f<Q.length;f++){var R=Q[f],z=this.parameter(R);if(typeof z=="string")z=[z];if(R==a)z=b===null||b==""?[]:h?z.concat([b]):[b];for(var S=0;S<z.length;S++)p.push(R+"="+z[S])}c.inArray(a,Q)==-1&&p.push(a+"="+b);this.queryString(p.join("&"));return this}b=this.value();f=b.indexOf("?");if(f!=-1){b=b.substr(f+1);p=b.split("&");b=[];for(f=0;f<p.length;f++){h=
+p[f].split("=");h[0]==a&&b.push(h[1])}if(b.length!==0)return b.length!=1?b:b[0]}},pathNames:function(){var a=this.path(),b=a.split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.value(),b=a.indexOf("?"),h=[];if(b!=-1){a=a.substr(b+1);if(a!=""&&a.indexOf("=")!=-1){a=a.split("&");for(b=0;b<a.length;b++){var f=a[b].split("=")[0];c.inArray(f,h)==-1&&h.push(f)}}}return h}}}();c.fn.address=function(A){var v=
+function(){var s=A?A.call(this):/address:/.test(c(this).attr("rel"))?c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(s);return false};c(this).click(v).live("click",v)}})(jQuery);
View
25 samples/events/index.html
@@ -5,13 +5,13 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link type="text/css" href="styles.css" rel="stylesheet">
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
- <script type="text/javascript" src="jquery.address-1.2.min.js"></script>
+ <script type="text/javascript" src="jquery.address-1.2.min.js?crawlable=0&amp;strict=0"></script>
<script type="text/javascript">
// Simple log
var log = function(msg) {
if (!$('.log').length) {
- $('<div class="log" />').appendTo('.content');
+ $('<div class="log" />').appendTo('.page');
}
$('.log').append(msg.replace(/^([^:]*):(.*)$/, '<p><b>$1:</b> <span class="$1">$2</span></p>'))
.attr({scrollTop: $('.log').attr('scrollHeight')})
@@ -20,19 +20,22 @@
// Event handlers
$.address.init(function(event) {
- log('init: ' + event.value);
+ log('init: "' + event.value + '"');
+ $('a').address(function() {
+ return $(this).attr('href').replace(location.pathname, '');
+ });
}).change(function(event) {
- log('change: ' + event.value);
- var text = (event.value == '/') ? 'Home' :
+ log('change: "' + event.value + '"');
+ var text = (event.value == '') ? 'Home' :
event.pathNames[0].substr(0, 1).toUpperCase() +
event.pathNames[0].substr(1);
$('a').each(function() {
$(this).toggleClass('selected', $(this).text() == text);
});
}).internalChange(function(event) {
- log('internalChange: ' + event.value);
+ log('internalChange: "' + event.value + '"');
}).externalChange(function(event) {
- log('externalChange: ' + event.value);
+ log('externalChange: "' + event.value + '"');
});
</script>
@@ -42,16 +45,16 @@
<h1>jQuery Address Events</h1>
<ul class="nav">
<li>
- <a href="/jquery/address/samples/events/" rel="address:/">Home</a>
+ <a href="/jquery/address/samples/events/">Home</a>
</li>
<li>
- <a href="/jquery/address/samples/events/about" rel="address:/about">About</a>
+ <a href="/jquery/address/samples/events/about">About</a>
</li>
<li>
- <a href="/jquery/address/samples/events/portfolio" rel="address:/portfolio">Portfolio</a>
+ <a href="/jquery/address/samples/events/portfolio">Portfolio</a>
</li>
<li>
- <a href="/jquery/address/samples/events/contact" rel="address:/contact">Contact</a>
+ <a href="/jquery/address/samples/events/contact">Contact</a>
</li>
</ul>
</div>
View
30 samples/events/jquery.address-1.2.min.js
@@ -6,20 +6,20 @@
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
- * Date: 2010-03-19 09:31:48 +0200 (Fri, 19 Mar 2010)
+ * Date: 2010-03-20 21:26:11 +0200 (Sat, 20 Mar 2010)
*/
(function(c){c.address=function(){var A=function(a){c(c.address).trigger(c.extend(c.Event(a),function(){for(var b={},h=c.address.parameterNames(),f=0,p=h.length;f<p;f++)b[h[f]]=c.address.parameter(h[f]);return{value:c.address.value(),path:c.address.path(),pathNames:c.address.pathNames(),parameterNames:h,parameters:b,queryString:c.address.queryString()}}.call(c.address)))},v=function(a,b,h){if(h||b)c(c.address).bind(a,h||b,h&&b);return c.address},s=function(){var a=d.href.indexOf("#");return a!=-1?
-T(I(t(d.href.substr(a+1),i))):""},U=function(){return"javascript"},V=function(a,b){if(j.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){return b?(a!=""?"!":"")+a:a.replace(/^\!/,"")},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=s(),b=g!=a;if(B&&
-m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(i)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(i)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[j.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==L)pageTracker._trackPageview(a);
-else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0";k.src=U()+":"+i;k.noResize=e;k.frameBorder=k.frameSpacing=0}else{k.src=U()+":"+i;k.style.display=
-"none";l.body.insertAdjacentElement("afterBegin",k)}D(function(){c(k).bind("load",function(){var b=k.contentWindow;g=typeof b[q]!=x?b[q]:"";if(g!=s()){F(i);d.hash=J(t(g,e),e)}});typeof k.contentWindow[q]==x&&Y()},50)}else if(B){if(m<418){c(l.body).append('<form id="'+q+'" style="position:absolute;top:-9999px;" method="get"></form>');N=l.getElementById(q)}if(typeof d[q]==x)d[q]={};if(typeof d[q][d.pathname]!=x)w=d[q][d.pathname].split(",")}D(function(){A("init");F(i)},1);if(u&&m>7||!u&&"on"+H in o)if(o.addEventListener)o.addEventListener(H,
-G,false);else o.attachEvent&&o.attachEvent("on"+H,G);else da(G,50);c("a[rel*=address:]").address()}},ea=function(){if(o.removeEventListener)o.removeEventListener(H,G,false);else o.detachEvent&&o.detachEvent("on"+H,G)},q="jQueryAddress",L="function",x="undefined",H="hashchange",e=true,i=false,n=c.browser,m=parseFloat(c.browser.version),aa=n.mozilla,u=n.msie,r=n.opera,B=n.safari,O=i,o=function(){try{return top.document!==undefined?top:window}catch(a){return window}}(),l=o.document,E=o.history,d=o.location,
-da=setInterval,D=setTimeout,I=decodeURI,T=encodeURI;n=navigator.userAgent;var k,N,y=W(document),ba=y?y.indexOf("?"):-1,fa=l.title,C=E.length,K=i,Z=i,P=e,ca=e,M=i,w=[],g=s(),j={autoUpdate:e,crawlable:e,history:e,strict:e};if(u){m=parseFloat(n.substr(n.indexOf("MSIE")+4));if(l.documentMode&&l.documentMode!=m)m=l.documentMode!=8?7:8}if(O=aa&&m>=1||u&&m>=6||r&&m>=9.5||B&&m>=312){for(n=1;n<C;n++)w.push("");w.push(g);if(u&&d.hash!=g)d.hash="#"+J(t(g,e),e);if(r)history.navigationMode="compatible";if(y&&
-ba!=-1){y=y.substr(ba+1).split("&");for(n=0;n<y.length;n++){r=y[n].split("=");if(/^(autoUpdate|crawlable|history|strict)$/.test(r[0]))j[r[0]]=isNaN(r[1])?/^(true|yes)$/i.test(r[1]):parseInt(r[1],10)!==0;if(/^tracker$/.test(r[0]))j[r[0]]=r[1]}}document.readyState=="complete"&&$();c($);c(window).bind("unload",ea)}else if(!O&&s()!=""||B&&m<418&&s()!=""&&d.search!=""){l.open();l.write('<html><head><meta http-equiv="refresh" content="0;url='+d.href.substr(0,d.href.indexOf("#"))+'" /></head></html>');l.close()}else X();
-return{init:function(a,b){return v("init",a,b)},change:function(a,b){return v("change",a,b)},internalChange:function(a,b){return v("internalChange",a,b)},externalChange:function(a,b){return v("externalChange",a,b)},baseURL:function(){var a=d.href;if(s()!="")a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},strict:function(a){if(a!==undefined){j.strict=a;return this}return j.strict},crawlable:function(a){if(a!==undefined){j.crawlable=a;return this}return j.crawlable},
-autoUpdate:function(a){if(a!==undefined){j.autoUpdate=a;return this}return j.autoUpdate},update:function(){M=e;this.value(g);M=i;return this},history:function(a){if(a!==undefined){j.history=a;return this}return j.history},tracker:function(a){if(a!==undefined){j.tracker=a;return this}return j.tracker},title:function(a){if(a!==undefined){a=I(a);D(function(){fa=l.title=a;if(ca&&k&&k.contentWindow&&k.contentWindow.document){k.contentWindow.document.title=a;ca=i}if(!P&&aa)d.replace(d.href.indexOf("#")!=
--1?d.href:d.href+"#");P=i},50);return this}return l.title},value:function(a){if(a!==undefined){a=T(I(V(a,e)));if(a=="/")a="";if(g==a&&!M)return;P=e;g=a;if(j.autoUpdate||M){K=e;F(e);w[E.length]=g;if(B)if(j.history){d[q][d.pathname]=w.toString();C=E.length+1;if(m<418){if(d.search==""){N.action="#"+t(g,e);N.submit()}}else if(m<523||g==""){a=l.createEvent("MouseEvents");a.initEvent("click",e,e);var b=l.createElement("a");b.href="#"+t(g,e);b.dispatchEvent(a)}else d.hash="#"+t(g,e)}else d.replace("#"+t(g,
-e));else if(g!=s())if(j.history)d.hash="#"+J(t(g,e),e);else d.replace("#"+t(g,e));u&&m<8&&j.history&&D(Y,50);if(B)D(function(){K=i},1);else K=i}return this}if(!O)return null;return I(V(J(g,i),i))},path:function(a){if(a!==undefined){var b=this.queryString();this.value(a+(b?"?"+b:""));return this}a=this.value();return a.indexOf("?")!=-1?a.split("?")[0]:a},queryString:function(a){if(a!==undefined){this.value(this.path()+(a?"?"+a:""));return this}a=this.value();var b=a.indexOf("?");if(b!=-1&&b<a.length)return a.substr(b+
-1)},parameter:function(a,b,h){var f,p;if(b!==undefined){var Q=this.parameterNames();p=[];for(f=0;f<Q.length;f++){var R=Q[f],z=this.parameter(R);if(typeof z=="string")z=[z];if(R==a)z=b===null||b==""?[]:h?z.concat([b]):[b];for(var S=0;S<z.length;S++)p.push(R+"="+z[S])}c.inArray(a,Q)==-1&&p.push(a+"="+b);this.queryString(p.join("&"));return this}b=this.value();f=b.indexOf("?");if(f!=-1){b=b.substr(f+1);p=b.split("&");b=[];for(f=0;f<p.length;f++){h=p[f].split("=");h[0]==a&&b.push(h[1])}if(b.length!==
-0)return b.length!=1?b:b[0]}},pathNames:function(){var a=this.path(),b=a.split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.value(),b=a.indexOf("?"),h=[];if(b!=-1){a=a.substr(b+1);if(a!=""&&a.indexOf("=")!=-1){a=a.split("&");for(b=0;b<a.length;b++){var f=a[b].split("=")[0];c.inArray(f,h)==-1&&h.push(f)}}}return h}}}();c.fn.address=function(A){var v=function(){var s=A?A.call(this):/address:/.test(c(this).attr("rel"))?
-c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(s);return false};c(this).click(v).live("click",v)}})(jQuery);
+T(I(t(d.href.substr(a+1),j))):""},U=function(){return"javascript"},V=function(a,b){if(i.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){if(i.crawlable)return b?(a!=""?"!":"")+a:a.replace(/^\!/,"");return a},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=
+s(),b=g!=a;if(B&&m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(j)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(j)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[i.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==
+L)pageTracker._trackPageview(a);else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0";k.src=U()+":"+j;k.noResize=e;k.frameBorder=k.frameSpacing=0}else{k.src=
+U()+":"+j;k.style.display="none";l.body.insertAdjacentElement("afterBegin",k)}D(function(){c(k).bind("load",function(){var b=k.contentWindow;g=typeof b[q]!=x?b[q]:"";if(g!=s()){F(j);d.hash=J(t(g,e),e)}});typeof k.contentWindow[q]==x&&Y()},50)}else if(B){if(m<418){c(l.body).append('<form id="'+q+'" style="position:absolute;top:-9999px;" method="get"></form>');N=l.getElementById(q)}if(typeof d[q]==x)d[q]={};if(typeof d[q][d.pathname]!=x)w=d[q][d.pathname].split(",")}D(function(){A("init");F(j)},1);
+if(u&&m>7||!u&&"on"+H in o)if(o.addEventListener)o.addEventListener(H,G,false);else o.attachEvent&&o.attachEvent("on"+H,G);else da(G,50);c("a[rel*=address:]").address()}},ea=function(){if(o.removeEventListener)o.removeEventListener(H,G,false);else o.detachEvent&&o.detachEvent("on"+H,G)},q="jQueryAddress",L="function",x="undefined",H="hashchange",e=true,j=false,i={autoUpdate:e,crawlable:e,history:e,strict:e},n=c.browser,m=parseFloat(c.browser.version),aa=n.mozilla,u=n.msie,r=n.opera,B=n.safari,O=j,
+o=function(){try{return top.document!==undefined?top:window}catch(a){return window}}(),l=o.document,E=o.history,d=o.location,da=setInterval,D=setTimeout,I=decodeURI,T=encodeURI;n=navigator.userAgent;var k,N,y=W(document),ba=y?y.indexOf("?"):-1,fa=l.title,C=E.length,K=j,Z=j,P=e,ca=e,M=j,w=[],g=s();if(u){m=parseFloat(n.substr(n.indexOf("MSIE")+4));if(l.documentMode&&l.documentMode!=m)m=l.documentMode!=8?7:8}if(O=aa&&m>=1||u&&m>=6||r&&m>=9.5||B&&m>=312){for(n=1;n<C;n++)w.push("");w.push(g);if(u&&d.hash!=
+g)d.hash="#"+J(t(g,e),e);if(r)history.navigationMode="compatible";if(y&&ba!=-1){y=y.substr(ba+1).split("&");for(n=0;n<y.length;n++){r=y[n].split("=");if(/^(autoUpdate|crawlable|history|strict)$/.test(r[0]))i[r[0]]=isNaN(r[1])?/^(true|yes)$/i.test(r[1]):parseInt(r[1],10)!==0;if(/^tracker$/.test(r[0]))i[r[0]]=r[1]}}document.readyState=="complete"&&$();c($);c(window).bind("unload",ea)}else if(!O&&s()!=""||B&&m<418&&s()!=""&&d.search!=""){l.open();l.write('<html><head><meta http-equiv="refresh" content="0;url='+
+d.href.substr(0,d.href.indexOf("#"))+'" /></head></html>');l.close()}else X();return{init:function(a,b){return v("init",a,b)},change:function(a,b){return v("change",a,b)},internalChange:function(a,b){return v("internalChange",a,b)},externalChange:function(a,b){return v("externalChange",a,b)},baseURL:function(){var a=d.href;if(s()!="")a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},strict:function(a){if(a!==undefined){i.strict=a;return this}return i.strict},crawlable:function(a){if(a!==
+undefined){i.crawlable=a;return this}return i.crawlable},autoUpdate:function(a){if(a!==undefined){i.autoUpdate=a;return this}return i.autoUpdate},update:function(){M=e;this.value(g);M=j;return this},history:function(a){if(a!==undefined){i.history=a;return this}return i.history},tracker:function(a){if(a!==undefined){i.tracker=a;return this}return i.tracker},title:function(a){if(a!==undefined){a=I(a);D(function(){fa=l.title=a;if(ca&&k&&k.contentWindow&&k.contentWindow.document){k.contentWindow.document.title=
+a;ca=j}if(!P&&aa)d.replace(d.href.indexOf("#")!=-1?d.href:d.href+"#");P=j},50);return this}return l.title},value:function(a){if(a!==undefined){a=T(I(V(a,e)));if(a=="/")a="";if(g==a&&!M)return;P=e;g=a;if(i.autoUpdate||M){K=e;F(e);w[E.length]=g;if(B)if(i.history){d[q][d.pathname]=w.toString();C=E.length+1;if(m<418){if(d.search==""){N.action="#"+t(g,e);N.submit()}}else if(m<523||g==""){a=l.createEvent("MouseEvents");a.initEvent("click",e,e);var b=l.createElement("a");b.href="#"+t(g,e);b.dispatchEvent(a)}else d.hash=
+"#"+t(g,e)}else d.replace("#"+t(g,e));else if(g!=s())if(i.history)d.hash="#"+J(t(g,e),e);else d.replace("#"+t(g,e));u&&m<8&&i.history&&D(Y,50);if(B)D(function(){K=j},1);else K=j}return this}if(!O)return null;return I(V(J(g,j),j))},path:function(a){if(a!==undefined){var b=this.queryString();this.value(a+(b?"?"+b:""));return this}a=this.value();return a.indexOf("?")!=-1?a.split("?")[0]:a},queryString:function(a){if(a!==undefined){this.value(this.path()+(a?"?"+a:""));return this}a=this.value();var b=
+a.indexOf("?");if(b!=-1&&b<a.length)return a.substr(b+1)},parameter:function(a,b,h){var f,p;if(b!==undefined){var Q=this.parameterNames();p=[];for(f=0;f<Q.length;f++){var R=Q[f],z=this.parameter(R);if(typeof z=="string")z=[z];if(R==a)z=b===null||b==""?[]:h?z.concat([b]):[b];for(var S=0;S<z.length;S++)p.push(R+"="+z[S])}c.inArray(a,Q)==-1&&p.push(a+"="+b);this.queryString(p.join("&"));return this}b=this.value();f=b.indexOf("?");if(f!=-1){b=b.substr(f+1);p=b.split("&");b=[];for(f=0;f<p.length;f++){h=
+p[f].split("=");h[0]==a&&b.push(h[1])}if(b.length!==0)return b.length!=1?b:b[0]}},pathNames:function(){var a=this.path(),b=a.split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.value(),b=a.indexOf("?"),h=[];if(b!=-1){a=a.substr(b+1);if(a!=""&&a.indexOf("=")!=-1){a=a.split("&");for(b=0;b<a.length;b++){var f=a[b].split("=")[0];c.inArray(f,h)==-1&&h.push(f)}}}return h}}}();c.fn.address=function(A){var v=
+function(){var s=A?A.call(this):/address:/.test(c(this).attr("rel"))?c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(s);return false};c(this).click(v).live("click",v)}})(jQuery);
View
2 samples/tabs/index.html
@@ -7,7 +7,7 @@
<link type="text/css" href="styles.css" rel="stylesheet">
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jquery-ui-1.8rc3.custom.min.js"></script>
- <script type="text/javascript" src="jquery.address-1.2.min.js"></script>
+ <script type="text/javascript" src="jquery.address-1.2.min.js?crawlable=0"></script>
<script type="text/javascript">
var tabs;
View
30 samples/tabs/jquery.address-1.2.min.js
@@ -6,20 +6,20 @@
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
- * Date: 2010-03-19 09:31:48 +0200 (Fri, 19 Mar 2010)
+ * Date: 2010-03-20 21:26:11 +0200 (Sat, 20 Mar 2010)
*/
(function(c){c.address=function(){var A=function(a){c(c.address).trigger(c.extend(c.Event(a),function(){for(var b={},h=c.address.parameterNames(),f=0,p=h.length;f<p;f++)b[h[f]]=c.address.parameter(h[f]);return{value:c.address.value(),path:c.address.path(),pathNames:c.address.pathNames(),parameterNames:h,parameters:b,queryString:c.address.queryString()}}.call(c.address)))},v=function(a,b,h){if(h||b)c(c.address).bind(a,h||b,h&&b);return c.address},s=function(){var a=d.href.indexOf("#");return a!=-1?
-T(I(t(d.href.substr(a+1),i))):""},U=function(){return"javascript"},V=function(a,b){if(j.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){return b?(a!=""?"!":"")+a:a.replace(/^\!/,"")},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=s(),b=g!=a;if(B&&
-m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(i)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(i)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[j.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==L)pageTracker._trackPageview(a);
-else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0";k.src=U()+":"+i;k.noResize=e;k.frameBorder=k.frameSpacing=0}else{k.src=U()+":"+i;k.style.display=
-"none";l.body.insertAdjacentElement("afterBegin",k)}D(function(){c(k).bind("load",function(){var b=k.contentWindow;g=typeof b[q]!=x?b[q]:"";if(g!=s()){F(i);d.hash=J(t(g,e),e)}});typeof k.contentWindow[q]==x&&Y()},50)}else if(B){if(m<418){c(l.body).append('<form id="'+q+'" style="position:absolute;top:-9999px;" method="get"></form>');N=l.getElementById(q)}if(typeof d[q]==x)d[q]={};if(typeof d[q][d.pathname]!=x)w=d[q][d.pathname].split(",")}D(function(){A("init");F(i)},1);if(u&&m>7||!u&&"on"+H in o)if(o.addEventListener)o.addEventListener(H,
-G,false);else o.attachEvent&&o.attachEvent("on"+H,G);else da(G,50);c("a[rel*=address:]").address()}},ea=function(){if(o.removeEventListener)o.removeEventListener(H,G,false);else o.detachEvent&&o.detachEvent("on"+H,G)},q="jQueryAddress",L="function",x="undefined",H="hashchange",e=true,i=false,n=c.browser,m=parseFloat(c.browser.version),aa=n.mozilla,u=n.msie,r=n.opera,B=n.safari,O=i,o=function(){try{return top.document!==undefined?top:window}catch(a){return window}}(),l=o.document,E=o.history,d=o.location,
-da=setInterval,D=setTimeout,I=decodeURI,T=encodeURI;n=navigator.userAgent;var k,N,y=W(document),ba=y?y.indexOf("?"):-1,fa=l.title,C=E.length,K=i,Z=i,P=e,ca=e,M=i,w=[],g=s(),j={autoUpdate:e,crawlable:e,history:e,strict:e};if(u){m=parseFloat(n.substr(n.indexOf("MSIE")+4));if(l.documentMode&&l.documentMode!=m)m=l.documentMode!=8?7:8}if(O=aa&&m>=1||u&&m>=6||r&&m>=9.5||B&&m>=312){for(n=1;n<C;n++)w.push("");w.push(g);if(u&&d.hash!=g)d.hash="#"+J(t(g,e),e);if(r)history.navigationMode="compatible";if(y&&
-ba!=-1){y=y.substr(ba+1).split("&");for(n=0;n<y.length;n++){r=y[n].split("=");if(/^(autoUpdate|crawlable|history|strict)$/.test(r[0]))j[r[0]]=isNaN(r[1])?/^(true|yes)$/i.test(r[1]):parseInt(r[1],10)!==0;if(/^tracker$/.test(r[0]))j[r[0]]=r[1]}}document.readyState=="complete"&&$();c($);c(window).bind("unload",ea)}else if(!O&&s()!=""||B&&m<418&&s()!=""&&d.search!=""){l.open();l.write('<html><head><meta http-equiv="refresh" content="0;url='+d.href.substr(0,d.href.indexOf("#"))+'" /></head></html>');l.close()}else X();
-return{init:function(a,b){return v("init",a,b)},change:function(a,b){return v("change",a,b)},internalChange:function(a,b){return v("internalChange",a,b)},externalChange:function(a,b){return v("externalChange",a,b)},baseURL:function(){var a=d.href;if(s()!="")a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},strict:function(a){if(a!==undefined){j.strict=a;return this}return j.strict},crawlable:function(a){if(a!==undefined){j.crawlable=a;return this}return j.crawlable},
-autoUpdate:function(a){if(a!==undefined){j.autoUpdate=a;return this}return j.autoUpdate},update:function(){M=e;this.value(g);M=i;return this},history:function(a){if(a!==undefined){j.history=a;return this}return j.history},tracker:function(a){if(a!==undefined){j.tracker=a;return this}return j.tracker},title:function(a){if(a!==undefined){a=I(a);D(function(){fa=l.title=a;if(ca&&k&&k.contentWindow&&k.contentWindow.document){k.contentWindow.document.title=a;ca=i}if(!P&&aa)d.replace(d.href.indexOf("#")!=
--1?d.href:d.href+"#");P=i},50);return this}return l.title},value:function(a){if(a!==undefined){a=T(I(V(a,e)));if(a=="/")a="";if(g==a&&!M)return;P=e;g=a;if(j.autoUpdate||M){K=e;F(e);w[E.length]=g;if(B)if(j.history){d[q][d.pathname]=w.toString();C=E.length+1;if(m<418){if(d.search==""){N.action="#"+t(g,e);N.submit()}}else if(m<523||g==""){a=l.createEvent("MouseEvents");a.initEvent("click",e,e);var b=l.createElement("a");b.href="#"+t(g,e);b.dispatchEvent(a)}else d.hash="#"+t(g,e)}else d.replace("#"+t(g,
-e));else if(g!=s())if(j.history)d.hash="#"+J(t(g,e),e);else d.replace("#"+t(g,e));u&&m<8&&j.history&&D(Y,50);if(B)D(function(){K=i},1);else K=i}return this}if(!O)return null;return I(V(J(g,i),i))},path:function(a){if(a!==undefined){var b=this.queryString();this.value(a+(b?"?"+b:""));return this}a=this.value();return a.indexOf("?")!=-1?a.split("?")[0]:a},queryString:function(a){if(a!==undefined){this.value(this.path()+(a?"?"+a:""));return this}a=this.value();var b=a.indexOf("?");if(b!=-1&&b<a.length)return a.substr(b+
-1)},parameter:function(a,b,h){var f,p;if(b!==undefined){var Q=this.parameterNames();p=[];for(f=0;f<Q.length;f++){var R=Q[f],z=this.parameter(R);if(typeof z=="string")z=[z];if(R==a)z=b===null||b==""?[]:h?z.concat([b]):[b];for(var S=0;S<z.length;S++)p.push(R+"="+z[S])}c.inArray(a,Q)==-1&&p.push(a+"="+b);this.queryString(p.join("&"));return this}b=this.value();f=b.indexOf("?");if(f!=-1){b=b.substr(f+1);p=b.split("&");b=[];for(f=0;f<p.length;f++){h=p[f].split("=");h[0]==a&&b.push(h[1])}if(b.length!==
-0)return b.length!=1?b:b[0]}},pathNames:function(){var a=this.path(),b=a.split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.value(),b=a.indexOf("?"),h=[];if(b!=-1){a=a.substr(b+1);if(a!=""&&a.indexOf("=")!=-1){a=a.split("&");for(b=0;b<a.length;b++){var f=a[b].split("=")[0];c.inArray(f,h)==-1&&h.push(f)}}}return h}}}();c.fn.address=function(A){var v=function(){var s=A?A.call(this):/address:/.test(c(this).attr("rel"))?
-c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(s);return false};c(this).click(v).live("click",v)}})(jQuery);
+T(I(t(d.href.substr(a+1),j))):""},U=function(){return"javascript"},V=function(a,b){if(i.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){if(i.crawlable)return b?(a!=""?"!":"")+a:a.replace(/^\!/,"");return a},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=
+s(),b=g!=a;if(B&&m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(j)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(j)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[i.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==
+L)pageTracker._trackPageview(a);else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0";k.src=U()+":"+j;k.noResize=e;k.frameBorder=k.frameSpacing=0}else{k.src=
+U()+":"+j;k.style.display="none";l.body.insertAdjacentElement("afterBegin",k)}D(function(){c(k).bind("load",function(){var b=k.contentWindow;g=typeof b[q]!=x?b[q]:"";if(g!=s()){F(j);d.hash=J(t(g,e),e)}});typeof k.contentWindow[q]==x&&Y()},50)}else if(B){if(m<418){c(l.body).append('<form id="'+q+'" style="position:absolute;top:-9999px;" method="get"></form>');N=l.getElementById(q)}if(typeof d[q]==x)d[q]={};if(typeof d[q][d.pathname]!=x)w=d[q][d.pathname].split(",")}D(function(){A("init");F(j)},1);
+if(u&&m>7||!u&&"on"+H in o)if(o.addEventListener)o.addEventListener(H,G,false);else o.attachEvent&&o.attachEvent("on"+H,G);else da(G,50);c("a[rel*=address:]").address()}},ea=function(){if(o.removeEventListener)o.removeEventListener(H,G,false);else o.detachEvent&&o.detachEvent("on"+H,G)},q="jQueryAddress",L="function",x="undefined",H="hashchange",e=true,j=false,i={autoUpdate:e,crawlable:e,history:e,strict:e},n=c.browser,m=parseFloat(c.browser.version),aa=n.mozilla,u=n.msie,r=n.opera,B=n.safari,O=j,
+o=function(){try{return top.document!==undefined?top:window}catch(a){return window}}(),l=o.document,E=o.history,d=o.location,da=setInterval,D=setTimeout,I=decodeURI,T=encodeURI;n=navigator.userAgent;var k,N,y=W(document),ba=y?y.indexOf("?"):-1,fa=l.title,C=E.length,K=j,Z=j,P=e,ca=e,M=j,w=[],g=s();if(u){m=parseFloat(n.substr(n.indexOf("MSIE")+4));if(l.documentMode&&l.documentMode!=m)m=l.documentMode!=8?7:8}if(O=aa&&m>=1||u&&m>=6||r&&m>=9.5||B&&m>=312){for(n=1;n<C;n++)w.push("");w.push(g);if(u&&d.hash!=
+g)d.hash="#"+J(t(g,e),e);if(r)history.navigationMode="compatible";if(y&&ba!=-1){y=y.substr(ba+1).split("&");for(n=0;n<y.length;n++){r=y[n].split("=");if(/^(autoUpdate|crawlable|history|strict)$/.test(r[0]))i[r[0]]=isNaN(r[1])?/^(true|yes)$/i.test(r[1]):parseInt(r[1],10)!==0;if(/^tracker$/.test(r[0]))i[r[0]]=r[1]}}document.readyState=="complete"&&$();c($);c(window).bind("unload",ea)}else if(!O&&s()!=""||B&&m<418&&s()!=""&&d.search!=""){l.open();l.write('<html><head><meta http-equiv="refresh" content="0;url='+
+d.href.substr(0,d.href.indexOf("#"))+'" /></head></html>');l.close()}else X();return{init:function(a,b){return v("init",a,b)},change:function(a,b){return v("change",a,b)},internalChange:function(a,b){return v("internalChange",a,b)},externalChange:function(a,b){return v("externalChange",a,b)},baseURL:function(){var a=d.href;if(s()!="")a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},strict:function(a){if(a!==undefined){i.strict=a;return this}return i.strict},crawlable:function(a){if(a!==
+undefined){i.crawlable=a;return this}return i.crawlable},autoUpdate:function(a){if(a!==undefined){i.autoUpdate=a;return this}return i.autoUpdate},update:function(){M=e;this.value(g);M=j;return this},history:function(a){if(a!==undefined){i.history=a;return this}return i.history},tracker:function(a){if(a!==undefined){i.tracker=a;return this}return i.tracker},title:function(a){if(a!==undefined){a=I(a);D(function(){fa=l.title=a;if(ca&&k&&k.contentWindow&&k.contentWindow.document){k.contentWindow.document.title=
+a;ca=j}if(!P&&aa)d.replace(d.href.indexOf("#")!=-1?d.href:d.href+"#");P=j},50);return this}return l.title},value:function(a){if(a!==undefined){a=T(I(V(a,e)));if(a=="/")a="";if(g==a&&!M)return;P=e;g=a;if(i.autoUpdate||M){K=e;F(e);w[E.length]=g;if(B)if(i.history){d[q][d.pathname]=w.toString();C=E.length+1;if(m<418){if(d.search==""){N.action="#"+t(g,e);N.submit()}}else if(m<523||g==""){a=l.createEvent("MouseEvents");a.initEvent("click",e,e);var b=l.createElement("a");b.href="#"+t(g,e);b.dispatchEvent(a)}else d.hash=
+"#"+t(g,e)}else d.replace("#"+t(g,e));else if(g!=s())if(i.history)d.hash="#"+J(t(g,e),e);else d.replace("#"+t(g,e));u&&m<8&&i.history&&D(Y,50);if(B)D(function(){K=j},1);else K=j}return this}if(!O)return null;return I(V(J(g,j),j))},path:function(a){if(a!==undefined){var b=this.queryString();this.value(a+(b?"?"+b:""));return this}a=this.value();return a.indexOf("?")!=-1?a.split("?")[0]:a},queryString:function(a){if(a!==undefined){this.value(this.path()+(a?"?"+a:""));return this}a=this.value();var b=
+a.indexOf("?");if(b!=-1&&b<a.length)return a.substr(b+1)},parameter:function(a,b,h){var f,p;if(b!==undefined){var Q=this.parameterNames();p=[];for(f=0;f<Q.length;f++){var R=Q[f],z=this.parameter(R);if(typeof z=="string")z=[z];if(R==a)z=b===null||b==""?[]:h?z.concat([b]):[b];for(var S=0;S<z.length;S++)p.push(R+"="+z[S])}c.inArray(a,Q)==-1&&p.push(a+"="+b);this.queryString(p.join("&"));return this}b=this.value();f=b.indexOf("?");if(f!=-1){b=b.substr(f+1);p=b.split("&");b=[];for(f=0;f<p.length;f++){h=
+p[f].split("=");h[0]==a&&b.push(h[1])}if(b.length!==0)return b.length!=1?b:b[0]}},pathNames:function(){var a=this.path(),b=a.split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.value(),b=a.indexOf("?"),h=[];if(b!=-1){a=a.substr(b+1);if(a!=""&&a.indexOf("=")!=-1){a=a.split("&");for(b=0;b<a.length;b++){var f=a[b].split("=")[0];c.inArray(f,h)==-1&&h.push(f)}}}return h}}}();c.fn.address=function(A){var v=
+function(){var s=A?A.call(this):/address:/.test(c(this).attr("rel"))?c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(s);return false};c(this).click(v).live("click",v)}})(jQuery);
View
30 test/jquery.address-1.2.min.js
@@ -6,20 +6,20 @@
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
- * Date: 2010-03-19 09:31:48 +0200 (Fri, 19 Mar 2010)
+ * Date: 2010-03-20 21:26:11 +0200 (Sat, 20 Mar 2010)
*/
(function(c){c.address=function(){var A=function(a){c(c.address).trigger(c.extend(c.Event(a),function(){for(var b={},h=c.address.parameterNames(),f=0,p=h.length;f<p;f++)b[h[f]]=c.address.parameter(h[f]);return{value:c.address.value(),path:c.address.path(),pathNames:c.address.pathNames(),parameterNames:h,parameters:b,queryString:c.address.queryString()}}.call(c.address)))},v=function(a,b,h){if(h||b)c(c.address).bind(a,h||b,h&&b);return c.address},s=function(){var a=d.href.indexOf("#");return a!=-1?
-T(I(t(d.href.substr(a+1),i))):""},U=function(){return"javascript"},V=function(a,b){if(j.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){return b?(a!=""?"!":"")+a:a.replace(/^\!/,"")},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=s(),b=g!=a;if(B&&
-m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(i)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(i)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[j.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==L)pageTracker._trackPageview(a);
-else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0";k.src=U()+":"+i;k.noResize=e;k.frameBorder=k.frameSpacing=0}else{k.src=U()+":"+i;k.style.display=
-"none";l.body.insertAdjacentElement("afterBegin",k)}D(function(){c(k).bind("load",function(){var b=k.contentWindow;g=typeof b[q]!=x?b[q]:"";if(g!=s()){F(i);d.hash=J(t(g,e),e)}});typeof k.contentWindow[q]==x&&Y()},50)}else if(B){if(m<418){c(l.body).append('<form id="'+q+'" style="position:absolute;top:-9999px;" method="get"></form>');N=l.getElementById(q)}if(typeof d[q]==x)d[q]={};if(typeof d[q][d.pathname]!=x)w=d[q][d.pathname].split(",")}D(function(){A("init");F(i)},1);if(u&&m>7||!u&&"on"+H in o)if(o.addEventListener)o.addEventListener(H,
-G,false);else o.attachEvent&&o.attachEvent("on"+H,G);else da(G,50);c("a[rel*=address:]").address()}},ea=function(){if(o.removeEventListener)o.removeEventListener(H,G,false);else o.detachEvent&&o.detachEvent("on"+H,G)},q="jQueryAddress",L="function",x="undefined",H="hashchange",e=true,i=false,n=c.browser,m=parseFloat(c.browser.version),aa=n.mozilla,u=n.msie,r=n.opera,B=n.safari,O=i,o=function(){try{return top.document!==undefined?top:window}catch(a){return window}}(),l=o.document,E=o.history,d=o.location,
-da=setInterval,D=setTimeout,I=decodeURI,T=encodeURI;n=navigator.userAgent;var k,N,y=W(document),ba=y?y.indexOf("?"):-1,fa=l.title,C=E.length,K=i,Z=i,P=e,ca=e,M=i,w=[],g=s(),j={autoUpdate:e,crawlable:e,history:e,strict:e};if(u){m=parseFloat(n.substr(n.indexOf("MSIE")+4));if(l.documentMode&&l.documentMode!=m)m=l.documentMode!=8?7:8}if(O=aa&&m>=1||u&&m>=6||r&&m>=9.5||B&&m>=312){for(n=1;n<C;n++)w.push("");w.push(g);if(u&&d.hash!=g)d.hash="#"+J(t(g,e),e);if(r)history.navigationMode="compatible";if(y&&
-ba!=-1){y=y.substr(ba+1).split("&");for(n=0;n<y.length;n++){r=y[n].split("=");if(/^(autoUpdate|crawlable|history|strict)$/.test(r[0]))j[r[0]]=isNaN(r[1])?/^(true|yes)$/i.test(r[1]):parseInt(r[1],10)!==0;if(/^tracker$/.test(r[0]))j[r[0]]=r[1]}}document.readyState=="complete"&&$();c($);c(window).bind("unload",ea)}else if(!O&&s()!=""||B&&m<418&&s()!=""&&d.search!=""){l.open();l.write('<html><head><meta http-equiv="refresh" content="0;url='+d.href.substr(0,d.href.indexOf("#"))+'" /></head></html>');l.close()}else X();
-return{init:function(a,b){return v("init",a,b)},change:function(a,b){return v("change",a,b)},internalChange:function(a,b){return v("internalChange",a,b)},externalChange:function(a,b){return v("externalChange",a,b)},baseURL:function(){var a=d.href;if(s()!="")a=a.substr(0,a.indexOf("#"));if(/\/$/.test(a))a=a.substr(0,a.length-1);return a},strict:function(a){if(a!==undefined){j.strict=a;return this}return j.strict},crawlable:function(a){if(a!==undefined){j.crawlable=a;return this}return j.crawlable},
-autoUpdate:function(a){if(a!==undefined){j.autoUpdate=a;return this}return j.autoUpdate},update:function(){M=e;this.value(g);M=i;return this},history:function(a){if(a!==undefined){j.history=a;return this}return j.history},tracker:function(a){if(a!==undefined){j.tracker=a;return this}return j.tracker},title:function(a){if(a!==undefined){a=I(a);D(function(){fa=l.title=a;if(ca&&k&&k.contentWindow&&k.contentWindow.document){k.contentWindow.document.title=a;ca=i}if(!P&&aa)d.replace(d.href.indexOf("#")!=
--1?d.href:d.href+"#");P=i},50);return this}return l.title},value:function(a){if(a!==undefined){a=T(I(V(a,e)));if(a=="/")a="";if(g==a&&!M)return;P=e;g=a;if(j.autoUpdate||M){K=e;F(e);w[E.length]=g;if(B)if(j.history){d[q][d.pathname]=w.toString();C=E.length+1;if(m<418){if(d.search==""){N.action="#"+t(g,e);N.submit()}}else if(m<523||g==""){a=l.createEvent("MouseEvents");a.initEvent("click",e,e);var b=l.createElement("a");b.href="#"+t(g,e);b.dispatchEvent(a)}else d.hash="#"+t(g,e)}else d.replace("#"+t(g,
-e));else if(g!=s())if(j.history)d.hash="#"+J(t(g,e),e);else d.replace("#"+t(g,e));u&&m<8&&j.history&&D(Y,50);if(B)D(function(){K=i},1);else K=i}return this}if(!O)return null;return I(V(J(g,i),i))},path:function(a){if(a!==undefined){var b=this.queryString();this.value(a+(b?"?"+b:""));return this}a=this.value();return a.indexOf("?")!=-1?a.split("?")[0]:a},queryString:function(a){if(a!==undefined){this.value(this.path()+(a?"?"+a:""));return this}a=this.value();var b=a.indexOf("?");if(b!=-1&&b<a.length)return a.substr(b+
-1)},parameter:function(a,b,h){var f,p;if(b!==undefined){var Q=this.parameterNames();p=[];for(f=0;f<Q.length;f++){var R=Q[f],z=this.parameter(R);if(typeof z=="string")z=[z];if(R==a)z=b===null||b==""?[]:h?z.concat([b]):[b];for(var S=0;S<z.length;S++)p.push(R+"="+z[S])}c.inArray(a,Q)==-1&&p.push(a+"="+b);this.queryString(p.join("&"));return this}b=this.value();f=b.indexOf("?");if(f!=-1){b=b.substr(f+1);p=b.split("&");b=[];for(f=0;f<p.length;f++){h=p[f].split("=");h[0]==a&&b.push(h[1])}if(b.length!==
-0)return b.length!=1?b:b[0]}},pathNames:function(){var a=this.path(),b=a.split("/");if(a.substr(0,1)=="/"||a.length===0)b.splice(0,1);a.substr(a.length-1,1)=="/"&&b.splice(b.length-1,1);return b},parameterNames:function(){var a=this.value(),b=a.indexOf("?"),h=[];if(b!=-1){a=a.substr(b+1);if(a!=""&&a.indexOf("=")!=-1){a=a.split("&");for(b=0;b<a.length;b++){var f=a[b].split("=")[0];c.inArray(f,h)==-1&&h.push(f)}}}return h}}}();c.fn.address=function(A){var v=function(){var s=A?A.call(this):/address:/.test(c(this).attr("rel"))?
-c(this).attr("rel").split("address:")[1].split(" ")[0]:c(this).attr("href").replace(/^#\!?/,"");c.address.value(s);return false};c(this).click(v).live("click",v)}})(jQuery);
+T(I(t(d.href.substr(a+1),j))):""},U=function(){return"javascript"},V=function(a,b){if(i.strict)a=b?a.substr(0,1)!="/"?"/"+a:a:a==""?"/":a;return a},J=function(a,b){return u&&d.protocol=="file:"?b?g.replace(/\?/,"%3F"):g.replace(/%253F/,"?"):a},t=function(a,b){if(i.crawlable)return b?(a!=""?"!":"")+a:a.replace(/^\!/,"");return a},W=function(a){for(var b,h,f=0,p=a.childNodes.length;f<p;f++){if(a.childNodes[f].src)b=String(a.childNodes[f].src);if(h=W(a.childNodes[f]))b=h}return b},G=function(){if(!K){var a=
+s(),b=g!=a;if(B&&m<523){if(C!=E.length){C=E.length;if(typeof w[C-1]!=x)g=w[C-1];F(j)}}else if(u&&m<7&&b)d.reload();else if(b){g=a;F(j)}}},F=function(a){A("change");A(a?"internalChange":"externalChange");D(X,10)},X=function(){var a=(d.pathname+(/\/$/.test(d.pathname)?"":"/")+c.address.value()).replace(/\/\//,"/").replace(/^\/$/,""),b=window[i.tracker];if(typeof b==L)b(a);else if(typeof _gaq!=x&&typeof _gaq.push==L)_gaq.push(["_trackPageview",a]);else if(typeof pageTracker!=x&&typeof pageTracker._trackPageview==
+L)pageTracker._trackPageview(a);else typeof urchinTracker==L&&urchinTracker(a)},Y=function(){var a=k.contentWindow.document;a.open();a.write("<html><head><title>"+l.title+"</title><script>var "+q+' = "'+s()+'";<\/script></head></html>');a.close()},$=function(){if(!Z){Z=e;if(u&&m<8){var a=l.getElementsByTagName("frameset")[0];k=l.createElement((a?"":"i")+"frame");if(a){a.insertAdjacentElement("beforeEnd",k);a[a.cols?"cols":"rows"]+=",0<