You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

2 lines
1.4 KiB

/*! skrollr v0.5.11 https://github.com/Prinzhorn/skrollr | free to use under terms of MIT license */
(function(e,t){var n=/hsla?\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)%\s*,\s*(-?[\d.]+)%.*?\)/g,r=/rgba?\(\s*(-?[\d.]+%?)\s*,\s*(-?[\d.]+%?)\s*,\s*(-?[\d.]+%?).*?\)/g,i=/^#[^\s]+$/,s=t.setStyle;t.setStyle=function(e,t,i){s.apply(this,arguments);var u=e.style,a;if(t==="opacity"){u.zoom=1,i>=1&&u.removeAttribute?u.removeAttribute("filter"):u.filter="alpha(opacity="+i*100+")";return}if(i.indexOf("hsl")>-1){a=!1,i=i.replace(n,function(e,t,n,r){return a=!0,o.hsl(parseFloat(t),parseFloat(n),parseFloat(r))});if(a){try{u[t]=i}catch(f){}return}}if(i.indexOf("rgb")>-1){a=!1,i=i.replace(r,function(e,t,n,r){return a=!0,t=parseFloat(t,10),n=parseFloat(n,10),r=parseFloat(r,10),e.indexOf("%")>-1&&(t=t/100*255,n=n/100*255,r=r/100*255),o.rgb(t|0,n|0,r|0)});if(a){try{u[t]=i}catch(f){}return}}};var o={hsl:function(e,t,n,r){return e%=360,e/=60,n/=100,t=[n+=t*=(n<.5?n:1-n)/100,n-e%1*t*2,n-=t*=2,n,n+e%1*t,n+t],r=[t[~~e%6],t[(e|16)%6],t[(e|8)%6]],o.rgb(parseInt(r[0]*255,10),parseInt(r[1]*255,10),parseInt(r[2]*255,10))},rgb:function(e,t,n){return"#"+((256+e<<8|t)<<8|n).toString(16).slice(1)}};e.querySelector=e.querySelector||function(t){if(!i.test(t))throw'Unsupported selector "'+t+'". The querySelector polyfill only works for IDs.';return e.getElementById(t.substr(1))}})(document,window.skrollr);