Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * $shimansky.biz
- *
- * http://adapt.960.gs/
- * https://github.com/nathansmith/adapt/tree/master/assets/css
- *
- * original code:
- *
- * (function(a,b,c,d){function e(){clearTimeout(i);for(var c=a.innerWidth||b.documentElement.clientWidth||b.body.clientWidth||0,e,f,o,p,q=m,u=m-1;q--;){g="",e=l[q].split("="),f=e[0],p=e[1]?e[1].replace(/\s/g,""):d,e=(o=f.match("to"))?parseInt(f.split("to")[0],10):parseInt(f,10),f=o?parseInt(f.split("to")[1],10):d;if(!f&&q===u&&c>e||c>e&&c<=f){p&&(g=k+p);break}}h?h!==g&&(h=n.href=g,j&&j(q,c)):(h=n.href=g,j&&j(q,c),k&&(b.head||b.getElementsByTagName("head")[0]).appendChild(n))}function f(){clearTimeout(i),i=setTimeout(e,16)}if(c){var g,h,i,j=typeof c.callback=="function"?c.callback:d,k=c.path?c.path:"",l=c.range,m=l.length,n=b.createElement("link");n.rel="stylesheet",n.media="screen",e(),c.dynamic&&(a.addEventListener?a.addEventListener("resize",f,!1):a.attachEvent?a.attachEvent("onresize",f):a.onresize=f)}}(this,this.document,ADAPT_CONFIG));
- *
- * DIFF:
- * 1 - (function (a, b, c, d) {
- * 1 + var sbizFnAdaptCSS = function (a, b, c, d) {
- * 2 + "use strict";
- * 2 3 function e() {
- * 3 4 clearTimeout(i);
- * 4 5 for (var c = a.innerWidth || b.documentElement.clientWidth || b.body.clientWidth || 0, e, f, o, p, q = m, u = m - 1; q--; ) {
- * 5 6 g = "",
- * 6 7 e = l[q].split("="),
- * 7 8 f = e[0],
- * 8 9 p = e[1] ? e[1].replace(/\s/g, "") : d,
- * 9 10 e = (o = f.match("to")) ? parseInt(f.split("to")[0], 10) : parseInt(f, 10),
- * 10 11 f = o ? parseInt(f.split("to")[1], 10) : d;
- * 11 12 if (!f && q === u && c > e || c > e && c <= f) {
- * 12 13 p && (g = k + p);
- * 13 14 break
- * 14 15 }
- * 15 16 }
- * 16 17 h ? h !== g && (h = n.href = g, j && j(q, c)) : (h = n.href = g, j && j(q, c), k && (b.head || b.getElementsByTagName("head")[0]).appendChild(n))
- * 17 18 }
- * 18 19 function f() {
- * 19 20 clearTimeout(i),
- * 20 21 i = setTimeout(e, 16)
- * 21 22 }
- * 22 23 if (c) {
- * 23 24 var g,
- * 24 25 h,
- * 25 26 i,
- * 26 27 j = typeof c.callback == "function" ? c.callback : d,
- * 27 28 k = c.path ? c.path : "",
- * 28 29 l = c.range,
- * 29 30 m = l.length,
- * 30 31 n = b.createElement("link");
- * 31 32 n.rel = "stylesheet",
- * 32 33 n.media = "screen",
- * 33 34 e(),
- * 34 35 c.dynamic && (a.addEventListener ? a.addEventListener("resize", f, !1) : a.attachEvent ? a.attachEvent("onresize", f) : a.onresize = f)
- * 35 36 }
- * 36 - }
- * 37 - (this, this.document, ADAPT_CONFIG));
- * 37 + };
- *
- * initialising:
- *
- * var ADAPT_CONFIG={path:"/css/",dynamic:!0,range:"0px to 760px = 480.css,760px to 980px = 720.css,980px to 1280px = 960.css,1280px to 1600px = 1200.css,1600px to 1920px = 1200.css,1940px to 2540px = 1200.css,2540px = 1200.css".split(",")};
- * sbizFnAdaptCSS(this, this.document, ADAPT_CONFIG);
- */
- var sbizFnAdaptCSS = function(a,b,c,d){"use strict";function e(){clearTimeout(i);for(var c=a.innerWidth||b.documentElement.clientWidth||b.body.clientWidth||0,e,f,o,p,q=m,u=m-1;q--;){g="",e=l[q].split("="),f=e[0],p=e[1]?e[1].replace(/\s/g,""):d,e=(o=f.match("to"))?parseInt(f.split("to")[0],10):parseInt(f,10),f=o?parseInt(f.split("to")[1],10):d;if(!f&&q===u&&c>e||c>e&&c<=f){p&&(g=k+p);break}}h?h!==g&&(h=n.href=g,j&&j(q,c)):(h=n.href=g,j&&j(q,c),k&&(b.head||b.getElementsByTagName("head")[0]).appendChild(n))}function f(){clearTimeout(i),i=setTimeout(e,16)}if(c){var g,h,i,j=typeof c.callback=="function"?c.callback:d,k=c.path?c.path:"",l=c.range,m=l.length,n=b.createElement("link");n.rel="stylesheet",n.media="screen",e(),c.dynamic&&(a.addEventListener?a.addEventListener("resize",f,!1):a.attachEvent?a.attachEvent("onresize",f):a.onresize=f)}};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement