diff --git a/js/selectivizr-min.js b/js/selectivizr-min.js index f42aeed..5adda2f 100644 --- a/js/selectivizr-min.js +++ b/js/selectivizr-min.js @@ -1,5 +1,5 @@ /*! - * selectivizr v1.0.3b - (c) Keith Clark, freely distributable under the terms of the MIT license. + * selectivizr v1.0.2 - (c) Keith Clark, freely distributable under the terms of the MIT license. * selectivizr.com */ -!function(e){function t(e){return e.replace(H,V).replace(I,function(e,t,a){for(var s=a.split(","),c=0,l=s.length;l>c;c++){var i=u(s[c])+K,o=[];s[c]=i.replace(L,function(e,t,a,s,c){if(t)return o.length>0&&(O.push({selector:i.substring(0,c),patches:o}),o=[]),t;var l=a?n(a):r(s);return l?(o.push(l),"."+l.className):e})}return t+s.join(",")})}function r(e){return!G||G.test(e)?{className:c(e),applyClass:!0}:null}function n(t){var r,n,a=!0,s=c(t.slice(1)),l=":not("==t.substring(0,5);l&&(t=t.slice(5,-1));var i=t.indexOf("(");if(i>-1&&(t=t.substring(0,i)),":"==t.charAt(0))switch(t.slice(1)){case"root":a=function(e){return l?e!=E:e==E};break;case"target":if(8==A){a=function(t){var r=function(){var e=location.hash,r=e.slice(1);return l?e==J||t.id!=r:e!=J&&t.id==r};return p(e,"hashchange",function(){f(t,s,r())}),r()};break}return!1;case"checked":a=function(e){return U.test(e.type)&&p(e,"propertychange",function(){"checked"==event.propertyName&&f(e,s,e.checked!==l)}),e.checked!==l};break;case"disabled":l=!l;case"enabled":a=function(e){return D.test(e.tagName)?(p(e,"propertychange",function(){"$disabled"==event.propertyName&&f(e,s,e.$disabled===l)}),C.push(e),e.$disabled=e.disabled,e.disabled===l):":enabled"==t?l:!l};break;case"focus":r="focus",n="blur";case"hover":r||(r="mouseenter",n="mouseleave"),a=function(e){return p(e,l?n:r,function(){f(e,s,!0)}),p(e,l?r:n,function(){f(e,s,!1)}),l};break;default:if(!z.test(t))return!1}return{className:s,applyClass:a}}function a(){for(var e,t,r,n,a=0;ai;i++){for(var u=e[i],f=u.className,p=0,h=r.length;h>p;p++){var g=r[p];s(u,g)||!g.applyClass||g.applyClass!==!0&&g.applyClass(u)!==!0||(f=d(f,g.className,!0))}u.className=f}}}function s(e,t){return new RegExp("(^|\\s)"+t.className+"(\\s|$)").test(e.className)}function c(e){return j+"-"+(6==A&&w?M++:e.replace(P,function(e){return e.charCodeAt(0)}))}function l(t){e.console&&e.console.log(t)}function i(e){return e.replace(F,V)}function o(e){return i(e).replace(Y,K)}function u(e){return o(e.replace(Q,V).replace(W,V))}function f(e,t,r){var n=e.className,a=d(n,t,r);a!=n&&(e.className=a,e.parentNode.className+=J)}function d(e,t,r){var n=RegExp("(^|\\s)"+t+"(\\s|$)"),a=n.test(e);return r?a?e:e+K+t:a?i(e.replace(n,V)):e}function p(e,t,r){e.attachEvent("on"+t,r)}function h(){if(e.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){return null}}function g(e){return T.open("GET",e,!1),T.send(),200==T.status?T.responseText:J}function v(e,t,r){function n(e){return e.substring(0,e.indexOf("//"))}function a(e){return e.substring(0,e.indexOf("/",8))}if(t||(t=_),"//"==e.substring(0,2)&&(e=n(t)+e),/^https?:\/\//i.test(e))return r||a(t)==a(e)?e:null;if("/"==e.charAt(0))return a(t)+e;var s=t.split(/[?#]/)[0];return"?"!=e.charAt(0)&&"/"!=s.charAt(s.length-1)&&(s=s.substring(0,s.lastIndexOf("/")+1)),s+e}function b(e){return e?g(e).replace(R,J).replace(X,function(t,r,n,a,s,c){var l=b(v(n||s,e));return c?"@media "+c+" {"+l+"}":l}).replace(q,function(t,r,n,a){return n=n||J,r?t:" url("+n+v(a,e,!0)+n+") "}):J}function m(){for(var e,r,n=0;n0&&setInterval(function(){for(var e=0,t=C.length;t>e;e++){var r=C[e];r.disabled!==r.$disabled&&(r.disabled?(r.disabled=!1,r.$disabled=!0,r.disabled=!0):r.$disabled=r.disabled)}},250)}function N(e,t){var r=!1,n=!0,a=function(n){("readystatechange"!=n.type||"complete"==S.readyState)&&(("load"==n.type?e:S).detachEvent("on"+n.type,a,!1),!r&&(r=!0)&&t.call(e,n.type||n))},s=function(){try{E.doScroll("left")}catch(e){return setTimeout(s,50),void 0}a("poll")};if("complete"==S.readyState)t.call(e,J);else{if(S.createEventObject&&E.doScroll){try{n=!e.frameElement}catch(c){}n&&s()}p(S,"readystatechange",a),p(e,"load",a)}}var $=navigator.userAgent.match(/MSIE (\d+)/);if(!$)return!1;var S=document,E=S.documentElement,T=h(),A=$[1];if(!("CSS1Compat"!=S.compatMode||6>A||A>8)&&T){var k,x={NW:"*.Dom.select",MooTools:"$$",DOMAssistant:"*.$",Prototype:"$$",YAHOO:"*.util.Selector.query",Sizzle:"*",jQuery:"*",dojo:"*.query"},C=[],O=[],M=0,w=!0,j="slvzr",R=/(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*?/g,X=/@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))\s*([^;]*);/g,q=/(behavior\s*?:\s*)?\burl\(\s*(["']?)(?!data:)([^"')]+)\2\s*\)/g,z=/^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/,H=/:(:first-(?:line|letter))/g,I=/((?:^|(?:\s*})+)(?:\s*@media[^{]+{)?)\s*([^\{]*?[\[:][^{]+)/g,L=/([ +~>])|(:[a-z-]+(?:\(.*?\)+)?)|(\[.*?\])/g,B=/(:not\()?:(hover|enabled|disabled|focus|checked|target|active|visited|first-line|first-letter)\)?/g,P=/[^\w-]/g,D=/^(INPUT|SELECT|TEXTAREA|BUTTON)$/,U=/^(checkbox|radio)$/,G=A>6?/[\$\^*]=(['"])\1/:null,Q=/([(\[+~])\s+/g,W=/\s+([)\]+~])/g,Y=/\s+/g,F=/^\s*((?:[\S\s]*\S)?)\s*$/,J="",K=" ",V="$1",Z=S.getElementsByTagName("BASE"),_=Z.length>0?Z[0].href:S.location.href;m(),N(e,function(){for(var t in x){var r,n,a=e;if(e[t]){for(r=x[t].replace("*",t).split(".");(n=r.shift())&&(a=a[n]););if("function"==typeof a)return k=a,y(),void 0}}})}}(this); \ No newline at end of file +(function(j){function A(a){return a.replace(B,h).replace(C,function(a,d,b){for(var a=b.split(","),b=0,e=a.length;b0){var a=l,f,e=s.substring(0,e).replace(H,i);if(e==i||e.charAt(e.length-1)==o)e+="*";try{f=t(e)}catch(k){}if(f){e=0;for(c=f.length;e-1&&(a=a.substring(0,l));if(a.charAt(0)==":")switch(a.slice(1)){case "root":c=function(a){return b?a!=p:a==p};break;case "target":if(m==8){c=function(a){function c(){var d=location.hash,e=d.slice(1);return b?d==i||a.id!=e:d!=i&&a.id==e}k(j,"hashchange",function(){g(a,d,c())});return c()};break}return!1;case "checked":c=function(a){J.test(a.type)&&k(a,"propertychange",function(){event.propertyName=="checked"&&g(a,d,a.checked!==b)});return a.checked!==b};break;case "disabled":b=!b;case "enabled":c=function(c){if(K.test(c.tagName))return k(c,"propertychange",function(){event.propertyName=="$disabled"&&g(c,d,c.a===b)}),q.push(c),c.a=c.disabled,c.disabled===b;return a==":enabled"?b:!b};break;case "focus":e="focus",f="blur";case "hover":e||(e="mouseenter",f="mouseleave");c=function(a){k(a,b?f:e,function(){g(a,d,!0)});k(a,b?e:f,function(){g(a,d,!1)});return b};break;default:if(!L.test(a))return!1}return{className:d,b:c}}function w(a){return M+"-"+(m==6&&N?O++:a.replace(P,function(a){return a.charCodeAt(0)}))}function D(a){return a.replace(x,h).replace(Q,o)}function g(a,c,d){var b=a.className,c=u(b,c,d);if(c!=b)a.className=c,a.parentNode.className+=i}function u(a,c,d){var b=RegExp("(^|\\s)"+c+"(\\s|$)"),e=b.test(a);return d?e?a:a+o+c:e?a.replace(b,h).replace(x,h):a}function k(a,c,d){a.attachEvent("on"+c,d)}function r(a,c){if(/^https?:\/\//i.test(a))return c.substring(0,c.indexOf("/",8))==a.substring(0,a.indexOf("/",8))?a:null;if(a.charAt(0)=="/")return c.substring(0,c.indexOf("/",8))+a;var d=c.split(/[?#]/)[0];a.charAt(0)!="?"&&d.charAt(d.length-1)!="/"&&(d=d.substring(0,d.lastIndexOf("/")+1));return d+a}function y(a){if(a)return n.open("GET",a,!1),n.send(),(n.status==200?n.responseText:i).replace(R,i).replace(S,function(c,d,b,e,f){return y(r(b||f,a))}).replace(T,function(c,d,b){d=d||i;return" url("+d+r(b,a)+d+") "});return i}function U(){var a,c;a=f.getElementsByTagName("BASE");for(var d=a.length>0?a[0].href:f.location.href,b=0;b0&&setInterval(function(){for(var a=0,c=q.length;a8||!n)){var z={NW:"*.Dom.select",MooTools:"$$",DOMAssistant:"*.$",Prototype:"$$",YAHOO:"*.util.Selector.query",Sizzle:"*",jQuery:"*",dojo:"*.query"},t,q=[],O=0,N=!0,M="slvzr",R=/(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*/g,S=/@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))[^;]*;/g,T=/\burl\(\s*(["']?)(?!data:)([^"')]+)\1\s*\)/g,L=/^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/,B=/:(:first-(?:line|letter))/g,C=/(^|})\s*([^\{]*?[\[:][^{]+)/g,G=/([ +~>])|(:[a-z-]+(?:\(.*?\)+)?)|(\[.*?\])/g,H=/(:not\()?:(hover|enabled|disabled|focus|checked|target|active|visited|first-line|first-letter)\)?/g,P=/[^\w-]/g,K=/^(INPUT|SELECT|TEXTAREA|BUTTON)$/,J=/^(checkbox|radio)$/,v=m>6?/[\$\^*]=(['"])\1/:null,E=/([(\[+~])\s+/g,F=/\s+([)\]+~])/g,Q=/\s+/g,x=/^\s*((?:[\S\s]*\S)?)\s*$/,i="",o=" ",h="$1";(function(a,c){function d(){try{p.doScroll("left")}catch(a){setTimeout(d,50);return}b("poll")}function b(d){if(!(d.type=="readystatechange"&&f.readyState!="complete")&&((d.type=="load"?a:f).detachEvent("on"+d.type,b,!1),!e&&(e=!0)))c.call(a,d.type||d)}var e=!1,g=!0;if(f.readyState=="complete")c.call(a,i);else{if(f.createEventObject&&p.doScroll){try{g=!a.frameElement}catch(h){}g&&d()}k(f,"readystatechange",b);k(a,"load",b)}})(j,function(){for(var a in z){var c,d,b=j;if(j[a]){for(c=z[a].replace("*",a).split(".");(d=c.shift())&&(b=b[d]););if(typeof b=="function"){t=b;U();break}}}})}}})(this); \ No newline at end of file