Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: static/src/js/vendor/respond.js

Issue 29624561: Issue 6104 - Minified code in help center repository (Closed) Base URL: https://hg.adblockplus.org/help.eyeo.com
Patch Set: Consolidated gulp tasks Created Dec. 7, 2017, 2:48 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
2 * Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
3 * */
4
5 ! function(a) {
6 "use strict";
7 a.matchMedia = a.matchMedia || function(a) {
8 var b, c = a.documentElement,
9 d = c.firstElementChild || c.firstChild,
10 e = a.createElement("body"),
11 f = a.createElement("div");
12 return f.id = "mq-test-1", f.style.cssText = "position:absolute;top:-100em ", e.style.background = "none", e.appendChild(f),
13 function(a) {
14 return f.innerHTML = '&shy;<style media="' + a + '"> #mq-test-1 { width: 42px; }</style>', c.insertBefore(e, d), b = 42 === f.offsetWidth, c.remov eChild(e), {
15 matches: b,
16 media: a
17 }
18 }
19 }(a.document)
20 }(this),
21 function(a) {
22 "use strict";
23
24 function b() {
25 u(!0)
26 }
27 var c = {};
28 a.respond = c, c.update = function() {};
29 var d = [],
30 e = function() {
31 var b = !1;
32 try {
33 b = new a.XMLHttpRequest
34 } catch (c) {
35 b = new a.ActiveXObject("Microsoft.XMLHTTP")
36 }
37 return function() {
38 return b
39 }
40 }(),
41 f = function(a, b) {
42 var c = e();
43 c && (c.open("GET", a, !0), c.onreadystatechange = function() {
44 4 !== c.readyState || 200 !== c.status && 304 !== c.status || b(c. responseText)
45 }, 4 !== c.readyState && c.send(null))
46 };
47 if (c.ajax = f, c.queue = d, c.regex = {
48 media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,
49 keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^ \}\{]*\})+[^\}]*\}/gi,
50 urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,
51 findStyles: /@media *([^\{]+)\{([\S\s]+?)$/,
52 only: /(only\s+)?([a-zA-Z]+)\s?/,
53 minw: /\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,
54 maxw: /\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/
55 }, c.mediaQueriesSupported = a.matchMedia && null !== a.matchMedia("only a ll") && a.matchMedia("only all").matches, !c.mediaQueriesSupported) {
56 var g, h, i, j = a.document,
57 k = j.documentElement,
58 l = [],
59 m = [],
60 n = [],
61 o = {},
62 p = 30,
63 q = j.getElementsByTagName("head")[0] || k,
64 r = j.getElementsByTagName("base")[0],
65 s = q.getElementsByTagName("link"),
66 t = function() {
67 var a, b = j.createElement("div"),
68 c = j.body,
69 d = k.style.fontSize,
70 e = c && c.style.fontSize,
71 f = !1;
72 return b.style.cssText = "position:absolute;font-size:1em;width:1e m", c || (c = f = j.createElement("body"), c.style.background = "none"), k.style .fontSize = "100%", c.style.fontSize = "100%", c.appendChild(b), f && k.insertBe fore(c, k.firstChild), a = b.offsetWidth, f ? k.removeChild(c) : c.removeChild(b ), k.style.fontSize = d, e && (c.style.fontSize = e), a = i = parseFloat(a)
73 },
74 u = function(b) {
75 var c = "clientWidth",
76 d = k[c],
77 e = "CSS1Compat" === j.compatMode && d || j.body[c] || d,
78 f = {},
79 o = s[s.length - 1],
80 r = (new Date).getTime();
81 if (b && g && p > r - g) return a.clearTimeout(h), h = a.setTimeou t(u, p), void 0;
82 g = r;
83 for (var v in l)
84 if (l.hasOwnProperty(v)) {
85 var w = l[v],
86 x = w.minw,
87 y = w.maxw,
88 z = null === x,
89 A = null === y,
90 B = "em";
91 x && (x = parseFloat(x) * (x.indexOf(B) > -1 ? i || t() : 1)), y && (y = parseFloat(y) * (y.indexOf(B) > -1 ? i || t() : 1)), w.hasquery & & (z && A || !(z || e >= x) || !(A || y >= e)) || (f[w.media] || (f[w.media] = [ ]), f[w.media].push(m[w.rules]))
92 }
93 for (var C in n) n.hasOwnProperty(C) && n[C] && n[C].parentNode == = q && q.removeChild(n[C]);
94 n.length = 0;
95 for (var D in f)
96 if (f.hasOwnProperty(D)) {
97 var E = j.createElement("style"),
98 F = f[D].join("\n");
99 E.type = "text/css", E.media = D, q.insertBefore(E, o.next Sibling), E.styleSheet ? E.styleSheet.cssText = F : E.appendChild(j.createTextNo de(F)), n.push(E)
100 }
101 },
102 v = function(a, b, d) {
103 var e = a.replace(c.regex.keyframes, "").match(c.regex.media),
104 f = e && e.length || 0;
105 b = b.substring(0, b.lastIndexOf("/"));
106 var g = function(a) {
107 return a.replace(c.regex.urls, "$1" + b + "$2$3")
108 },
109 h = !f && d;
110 b.length && (b += "/"), h && (f = 1);
111 for (var i = 0; f > i; i++) {
112 var j, k, n, o;
113 h ? (j = d, m.push(g(a))) : (j = e[i].match(c.regex.findStyles ) && RegExp.$1, m.push(RegExp.$2 && g(RegExp.$2))), n = j.split(","), o = n.leng th;
114 for (var p = 0; o > p; p++) k = n[p], l.push({
115 media: k.split("(")[0].match(c.regex.only) && RegExp.$2 || "all",
116 rules: m.length - 1,
117 hasquery: k.indexOf("(") > -1,
118 minw: k.match(c.regex.minw) && parseFloat(RegExp.$1) + (Re gExp.$2 || ""),
119 maxw: k.match(c.regex.maxw) && parseFloat(RegExp.$1) + (Re gExp.$2 || "")
120 })
121 }
122 u()
123 },
124 w = function() {
125 if (d.length) {
126 var b = d.shift();
127 f(b.href, function(c) {
128 v(c, b.href, b.media), o[b.href] = !0, a.setTimeout(functi on() {
129 w()
130 }, 0)
131 })
132 }
133 },
134 x = function() {
135 for (var b = 0; b < s.length; b++) {
136 var c = s[b],
137 e = c.href,
138 f = c.media,
139 g = c.rel && "stylesheet" === c.rel.toLowerCase();
140 e && g && !o[e] && (c.styleSheet && c.styleSheet.rawCssText ? (v(c.styleSheet.rawCssText, e, f), o[e] = !0) : (!/^([a-zA-Z:]*\/\/)/.test(e) && !r || e.replace(RegExp.$1, "").split("/")[0] === a.location.host) && ("//" === e.substring(0, 2) && (e = a.location.protocol + e), d.push({
141 href: e,
142 media: f
143 })))
144 }
145 w()
146 };
147 x(), c.update = x, c.getEmValue = t, a.addEventListener ? a.addEventListen er("resize", b, !1) : a.attachEvent && a.attachEvent("onresize", b)
148 }
149 }(this);
OLDNEW
« gulpfile.js ('K') | « static/src/js/vendor/ie8.js ('k') | static/src/scss/_licence.scss » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld