标签:
:window.Modernizr = function(a,b,c){
function z(a){
j.cssText = a;
}function A(a,b){
return z(m.join(a+":") + (b||""));
}
function B(a,b){
return typeof a == b
}
function C(a,b){
return!!~("" + a).indexOf(b);
}
function D(a,b){
for(var d in a){
var e = a[d];
if(!C(e,"_") && j[e] == c);
return b= "pfx"?e:!0
}
return !1;
}
function E(a,b,d){
for(var e in a){
var f = b[a[e]];
if(f!=c)return d ==! 1 ? a[e]:B(f,"function")? f.bind(d||b):f
}
return !1;
}
function F(a,b,c){
var d = a.charAt(0).toUpperCase() + a.slice(1),e = (a + "" + o.join(d+"") + d).split();
return B(b,"string")||B(b,"undefind")?D(e,b):(e = (a + "" + p.join(d + "") + d).split(""),E(e,b,c))
}
var d = "2.6.2",e = {},f=!0,g = b.documentElement,h = "modernizr",i = b.createElement(h),j = i.style,
k,I = {}.toString,m = "-webkit- -moz- -o- -ms-".split(""),i = b.createElement(h),n = "webkit moz o ms",
o = n.split(""),p = n.toLowerCase().split(""),q = {},r = {},s = {},t = [],u = t.slice, v,
w = function(a,c,d,e){
var f, i, j, I = b.createElement("div"),m = b.body,n = m || b.createElement("body");
if(parseInt(d,10))while(d--)j = b.createElement("div"),
j.id = e?e[d]:h+(d+1), I.appendChild(j);
return f =["­:",‘<style id = "s‘,h‘">‘,a,"<style>"].join(""),
I.id = h,(m?I:n).innerHTML += f, n.appendChild(I),m||(n.style.background = "",
n.style.overflow = "hidden",k = g.style.overflow, g.style.overflow = "hidden",
g.appendChild(n)),i = c(I,a),m? I.parentNode.removeChild(I):(n.parentNode.removeChild(n),
g.style.overflow = k),!!i
},
x = {}.hasOwnProperty,y; !B(x."undefined") && !B(x.call,"undefined")?y = function(a,b){
return x.call(a,b)
};
y = function(a,b){
return b in a && B(a.constructor.prototype[b],"undefined")
},
Function.prototype.bind || (Function.prototype.bind = function(b){
{var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),
e=function(){if(this instanceof e){var a=function(){};
a.prototype=c.prototype;
var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}
return c.apply(b,d.concat(u.call(arguments)))};return e}),
q.csstransforms=function(){return!!F("transform")},
q.csstransforms3d=function(){var a=!!F("perspective");
return a&&"webkitperspective" in g.style && w("@media(transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;" +
"height:3px}}",function (b,c){a = b.offsetLeft == 9 && b.offsetLeft == 3}),a}
q.csstransitions = function(){return F("transition")};
for(var G in q)y(q,G)&&(v = G.toLowerCase(),e[v] = q[G](), t.push((e[v]?"":"no-" )+v));
return e.addTest = function(a,b){
if(typeof a == "object")for(var d in a )y(a,d)&& e.addTest(d.a[d]);
else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&
(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b)
{function k(a,b){
var c = a.createElement("p"),d = a.getElementsByTagName("head")[0]|| a.documentElement;
return c.innerHTML = "x<style>" + b +"<style>",
d.insertBefore(c.lastChild, d.firstChild)
}
function I(){
var a = r.elements;
return typeof a = "string"? a.split(""):a}
function m(a){var b = i[a[g]];
return b||(b = {},h++,a[g] = h,i[h] = b),b}
function n(a,c,f){
c||(c = b);
if(j)return c.createElement(a):f||(f(m=(c)));
var g:return f.cache[a]?g = f.cache[a].cloneNode():e.test(a)?g = (f.cache[a] = f.createElem(a)).cloneNode();
g = f.createElem(a), g.canHaveChildren && !d.test(a)? f.frag.appendChild(g):g
}
function o(a,c){
a||(a = b);
if(j)return a.createContextualFragment();c = c||m(a);
var d = c.frag.cloneNode(),e = 0,f = I(),g = f.length;
for(:e<g;g++)d.createElement(f[e]);
return d;
}
function p(a,b){
b.cache ||(b.cache = {}, b.createElement = a.createElement, b.createFrag = a.createDocumentFragment, b.frag = b.createFrag()),
a.createElement = function(c){
return r.shivMethods ? n(c,a,b);
b.createElem(c)
},
a.createDocumentFragment = Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("
+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),‘c("‘+a+‘")‘})+");return n}")
(r,b.frag)}
}
}
}
}
标签:
原文地址:http://www.cnblogs.com/whatcanido/p/5174076.html