MCPcopy Create free account
hub / github.com/django/code.djangoproject.com / X

Function X

trac-env/htdocs/js/lib/webfont.js:44–44  ·  view source on GitHub ↗
(a,b)

Source from the content-addressed store, hash-verified

42(c=c[2],g=[],c=!c?g:c.split(","),0<c.length&&(c=ua[c[0]])&&(this.J[d]=c))}this.J[d]||(c=ua[d])&&(this.J[d]=c);for(c=0;c<f.length;c+=1)this.$.push(new J(d,f[c]))}};function V(a,b){this.a=(new E(navigator.userAgent,document)).parse();this.c=a;this.e=b}var ya={Arimo:j,Cousine:j,Tinos:j};V.prototype.H=function(a,b){b(a.j.M)};V.prototype.load=function(a){var b=this.c;if("MSIE"==this.a.getName()&&this.e.blocking!=j){var c=t(this.X,this,a),d=function(){b.z.body?c():setTimeout(d,0)};d()}else this.X(a)};
43V.prototype.X=function(a){for(var b=this.c,c=new ra(this.e.api,y(b),this.e.text),d=this.e.families,f=d.length,g=0;g<f;g++){var e=d[g].split(":");3==e.length&&c.S.push(e.pop());var h="";2==e.length&&""!=e[1]&&(h=":");c.p.push(e.join(h))}d=new ta(d);d.parse();da(b,c.f());a(d.$,d.J,ya)};function W(a,b){this.c=a;this.e=b;this.k=[]}W.prototype.D=function(a){return y(this.c)+(this.e.api||"//f.fontdeck.com/s/css/js/")+(this.c.v.location.hostname||this.c.G.location.hostname)+"/"+a+".js"};
44W.prototype.H=function(a,b){var c=this.e.id,d=this.c.v,f=this;c?(d.__webfontfontdeckmodule__||(d.__webfontfontdeckmodule__={}),d.__webfontfontdeckmodule__[c]=function(a,c){for(var d=0,k=c.fonts.length;d<k;++d){var p=c.fonts[d];f.k.push(new J(p.name,ia("font-weight:"+p.weight+";font-style:"+p.style)))}b(a)},z(this.c,this.D(c),function(a){a&&b(m)})):b(m)};W.prototype.load=function(a){a(this.k)};function X(a,b){this.c=a;this.e=b;this.k=[]}X.prototype.D=function(a){var b=y(this.c);return(this.e.api||b+"//use.typekit.net")+"/"+a+".js"};
45X.prototype.H=function(a,b){var c=this.e.id,d=this.e,f=this.c.v,g=this;c?(f.__webfonttypekitmodule__||(f.__webfonttypekitmodule__={}),f.__webfonttypekitmodule__[c]=function(c){c(a,d,function(a,c,d){for(var e=0;e<c.length;e+=1){var f=d[c[e]];if(f)for(var M=0;M<f.length;M+=1)g.k.push(new J(c[e],f[M]));else g.k.push(new J(c[e]))}b(a)})},z(this.c,this.D(c),function(a){a&&b(m)},2E3)):b(m)};X.prototype.load=function(a){a(this.k)};function Y(a,b){this.c=a;this.e=b;this.k=[]}Y.prototype.H=function(a,b){var c=this,d=c.e.projectId,f=c.e.version;if(d){var g=c.c.v;z(this.c,c.D(d,f),function(e){if(e)b(m);else{if(g["__mti_fntLst"+d]&&(e=g["__mti_fntLst"+d]()))for(var f=0;f<e.length;f++)c.k.push(new J(e[f].fontfamily));b(a.j.M)}}).id="__MonotypeAPIScript__"+d}else b(m)};Y.prototype.D=function(a,b){var c=y(this.c),d=(this.e.api||"fast.fonts.net/jsapi").replace(/^.*http(s?):(\/\/)?/,"");return c+"//"+d+"/"+a+".js"+(b?"?v="+b:"")};
46Y.prototype.load=function(a){a(this.k)};function Z(a,b){this.c=a;this.e=b}Z.prototype.load=function(a){var b,c,d=this.e.urls||[],f=this.e.families||[],g=this.e.testStrings||{};b=0;for(c=d.length;b<c;b++)da(this.c,d[b]);d=[];b=0;for(c=f.length;b<c;b++){var e=f[b].split(":");if(e[1])for(var h=e[1].split(","),k=0;k<h.length;k+=1)d.push(new J(e[0],h[k]));else d.push(new J(e[0]))}a(d,g)};Z.prototype.H=function(a,b){return b(a.j.M)};var $=new U(q);$.u.w.custom=function(a,b){return new Z(b,a)};$.u.w.fontdeck=function(a,b){return new W(b,a)};$.u.w.monotype=function(a,b){return new Y(b,a)};$.u.w.typekit=function(a,b){return new X(b,a)};$.u.w.google=function(a,b){return new V(b,a)};q.WebFont||(q.WebFont={},q.WebFont.load=t($.load,$),q.WebFontConfig&&$.load(q.WebFontConfig));})(this,document);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected