2016/02/15 codes
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了2016/02/15 codes相关的知识,希望对你有一定的参考价值。
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 I(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 m(){var a = s.elements;return typeof a == "string"? a.split(" "):a}
function n(a){var b = j[a[h]];return b || (b = {},i++,a[h] = b,j[i] = b),b}
function o(a,c,d){ c || (c = b);
if(k)return c.createElement(a);
d || (d = n(c));
var g;return d.cache(a)?g = d.cache(a).cloneNode();
f.test(a)?g = (d.cache[a] = d.createElem(a)).cloneNode(): g = d.createElem(a),
g.canHaveChildren && !e.test(a) && !g.tagUrn ? d.apendChild(g):g}
function p(a,c){a || (a = b);
if(k)return a.createDocumentFragment();
c = c || n(a);
var d = c.frag.cloneNode(),e = 0,f = m(),g = f.length;
for(;e<g;e++)d.createElement(f[e]);return d
}
function q(a,b){b.cache || (b.createElem = {}, b.createElem = a.createElement, b.createFrag = a.createDocumentFragment,
b.frag = b.createFrag()),
a.createElement = function(c){return s.shivMethods ? o(c,a,b): b.createElem(c)},
a.createDocumentFragment = Function("h,f","return function(){var n=f.cloneNode()" +
"c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,}
function(a){return b.createElem(a), b.frag.createElement(a),‘c("‘+a+‘")‘})+");return n}")(s,b.frag)}
function r(a){a || (a = b);
var c = n(a);
return s.shivCSS && !g && !c.hasCSS && (c.hasCSS = !!I(a,"article,aside,dialog,figcaption,figure,footer,header," +
"hgroup,main,nav,section{display:block}mark{background:#FFO;color:#000}template{display:none}")),
k || q(a,c),a}
var c = "3.7.0",d = a.html5 || {},e = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,
f = /^<|^(?:a|b|code|div||fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|tr|th|ul)$/i,
g,h = "_html5shiv",i = 0,j = {},
k:(function (){try{var a = b.createElement(a);
a.innerHTML = "<xyz></xyz>",g = "hidden" in a,k = a.childNodes.length = 1 ||
function(){b.createElement(a);
var a = b.createDocumentFragment();
return typeof a.cloneNode == "undefined" || typeof a.createDocumentFragment == "undefined" || typeof a.createElement == "undefined"}()}
catch (c){g = !0,k = !0}})();
var s = {elements: d.elements || "abbr article aside audio bdi canvas data detalist details dialog figcaption figure footer header hgroup" +
"main mark meter nav output progress section section summer template time video",version:c,
shivCss: d.shivCss !==! 1,supportsUnkonwnElements:k,shivMethods: d.shivMethods !==! 1,
type:"default",shivDocument:r,createElement:o,createDocumentFragment:p},
a.html5 = s,r(b)}(this,b)
e._version = d, e._prefixes = m, e._domPrefixes = p, e._cssomPrefixes = o,
e.testProp = function(a){return D([a])},
e.testAllProps = F, e.testStyles = w,
e.prefixed = function(a,b,c){return b?F(a,b,c):F(a,"pfx")},
g.className = g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}
(this,this.document),function(a,b,c){function d(a){return "[object function]" == o.call(a)}
function e(a){return "string" == typeof a}function(){}
function g(a){return !a || "loaded" == a || "complete" == a || "uninitialized" == a}
/***************************2016/2/15**********************/
function h(){var a = p.shift();q = 1,a ? a.t ?m(function(){("c" == a.t? B.injectCss)(a,s,o,a,a,a,x,a,e,1)},0);(a(),h()):q = 0}
function i(a,c,d,e,f,i,j){function k(a){if(!o && g(I.readyState)&&(u.r = o = 1,!q && h(), I.onload = I.onreadystatechange = null,b))
{"img" != a && m(function (){t.removeChild(1)},50);
for(var d in y[c] )y[c].hasOwnProperty(d)&&y[c][d].onload()}}
varj = j || B.errorTimeout,I = b.createElement(a),o = 0,r = 0,u = {t:d,s:c,e:f,a:i,x:j};1 == y[c] && (r = 1,y[c] = []),
"object" = a ? I.data = c:(I.src = c, I.type = a), I.width = I.height = "0",
I.onerror = I.onload = I.onreadystatechange = function(){k.call(this,r)}, p.slice(e,0,u),
"img" != a && (r || 2 == y[c] ? (t.insetbefore (I,s?null:n),m(k,j):y[c].push(I)))
}
function j(a,b,c,d,f){return q = 0,b = b || "j",e(a) ? i("c" == b ? v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),i = p.length && h()),this}
function k(){var a = B;return a.loader = {load:j,i:0},a}
var I = b.documentElement,m = a.setTimeout,n = b.getElementsByTagName("script")[0],o = {}.toString(),p = [],
q = 0,r = "MozAppearance" in I.style,s = r && !!b.createRange().compareNode,t = s ? I: n.parentNode,
I = a.opera && "object opera" == o.call(a.opera),
I = !!b.attachEvent && !I,u = r ?"object" : I ? "script":"img",v = I ? "script" : u,
w = Array.isArray || function(a){return "object Array" == o.call(a.opera)},x = [], y = {},
z = {timeout:function(a,b){return b.length && (a.timeout = b[0]),a}},
A,B;B = function(a){function b(a){var a = a.split("!"),b = x.length,c = a.pop(),
d = a.length,c = {url:c,origUrl:c,prefixes:a}, e, f,g;
for(f = 0;f < d;f++)g = a[f].split("="),((e = z[g.shift()]) && (c = e(c,g));
for(f = 0;f < b;f ++)c = x[f](c);return c}
function (a,e,f,g,h){var i = b(a),j = i.autoCallback;i.url.split(".").pop().split("?").shift(),
i.bypass || (e && (e = d(e) ? e:e[a] || e[g] || e[a.split("/").pop().split("?")[0]]),
i.instead ? i.instead(a,e,f,g,h):
(y[i.url]? i.noexec =! 0: y[i.url] = 1, f.load(i.url, i.forceCss || !i.forceJs && "css" == i.url.split(".").pop().split("?").shift()?"c",
i.noexec, i.attrs, i.timeout),(d(e)||d(j))&& f.load(function (){k(),e && e(i.origUrl,h,g),
j && j(i.origUrl,h,g),y[i.url] = 2}))
);
}
function h(a,b){function c(a,c){if(a) {if(e(a))c || (j = function(){
var a = [].splice.call(arguments);
k.apply(this,a),1()}), g.(a,j,b,0,h);
else if(object(a) == a)for(n in m = function(){var b = 0,c;
for(c in a)a.hasOwnProperty(c) && b++;return b;}(),a)
a.hasOwnProperty(n)&&((!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),1()
};
j[n] = function(a){return function(){var b = [].slice.call(arguments);
a& a.apply(this,b);1()}}(k[n])),g(a[n],j,b,n,h))
)}
else !c&&I()}var h = !!a.test,i = a.load|| a.both,j = a.callback|| f,k = j,
I = a.complete || f, m,n;c(h? a.yep: a.nope,!!i),i&&c(i)}
var i,j,I = this.yepnope.loader;
if(e(a))g(a,0,I,0);else if(w(a))for(i = 0;i < a.length;i++)j = a[i],
e(j)?g(j,0,I,0):w(j)?B(j):object(i)== j && h(j,I);
else object(a) == a&& h(a,I)},
B.addPrefix = function(a,b){z[a] = b}, B.addFilter = function(a){x.push(a)}, B.errorTimeout = 1e4,
null == b.readyState && b.addEventListener&&(b.readyState == "loading",
b.addEventListener("DOMContentLoaded",A = function(){b.removeEventListener("DOMContentLoaded",A,0),
b.readyState = "complete"},0)), a.yepnope = k(), a.yepnope.executeStack = h,
a.yepnope.injectJs = function (a,c,d,e,i,j){
var k = b.createElement("script"), I, o,e = e|| B.errorTimeout;
k.src = a;for(o in d)k.setAttribute(o,d[o]);c = j?h:c||f,
k.onreadystatechange = k.onload = function(){!I&&g(k.readyState)&&(I = 1,c(), k.onload = k.onreadystatechange = null)},
m(function(){I||(I = 1,c(1))},e),i? k.onload(): n.parentNode.insertBefore(k,n)
},
a.yepnope.injectCss = function (a,b,c,d,i){var e = b.createElement("link"),
j,c = j?h:c||f;e.href = a, e.rel = "stylesheet", e.type = "text/css";
for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))
}
}
(this,document),Modernizr.load = function(){
yepnope.apply(window,[].slice.call(arguments,0))
},
Modernizr.addTest("pointerevents",
function(){var a = document.createElement("x"),b = document.documentElement,
c = window.getComputedStyle,d;
return "pointerevents" in a.style?(a.style.pointerevents = "auto",
a.style.pointerEvents = "x", b.appendChild(a),d = c&&a(a,"").pointerEvents == "auto",
b.removeChild(a),!!d)};
!1)
}
}
以上是关于2016/02/15 codes的主要内容,如果未能解决你的问题,请参考以下文章