diff --git a/goodtube.js b/goodtube.js
index d46aced..9372c92 100644
--- a/goodtube.js
+++ b/goodtube.js
@@ -1,15 +1,13 @@
-/* Imports
------------------------------------------------------------------------------------------- */
-// https://www.npmjs.com/package/dompurify
-import DOMPurify from 'DOMPurify';
-
-
(function () {
'use strict';
/* Setup the CSP (content security policy)
------------------------------------------------------------------------------------------ */
+ // Include DOM Purify (https://github.com/cure53/DOMPurify/blob/main/dist/purify.min.js)
+ // We're placing this inline this because fetching it from an external repo which don't have control over is likely unreliable in the long term
+ var Xt = Object.defineProperty; var c = (r, o) => Xt(r, "name", { value: o, configurable: !0 }); var { entries: gt, setPrototypeOf: ft, isFrozen: jt, getPrototypeOf: Vt, getOwnPropertyDescriptor: $t } = Object, { freeze: R, seal: b, create: ve } = Object, { apply: ke, construct: Ue } = typeof Reflect < "u" && Reflect; R || (R = c(function (o) { return o }, "freeze")); b || (b = c(function (o) { return o }, "seal")); ke || (ke = c(function (o, l) { for (var a = arguments.length, f = new Array(a > 2 ? a - 2 : 0), y = 2; y < a; y++)f[y - 2] = arguments[y]; return o.apply(l, f) }, "apply")); Ue || (Ue = c(function (o) { for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), f = 1; f < l; f++)a[f - 1] = arguments[f]; return new o(...a) }, "construct")); var fe = O(Array.prototype.forEach), qt = O(Array.prototype.lastIndexOf), ut = O(Array.prototype.pop), K = O(Array.prototype.push), Kt = O(Array.prototype.splice), me = O(String.prototype.toLowerCase), Ie = O(String.prototype.toString), Ce = O(String.prototype.match), Z = O(String.prototype.replace), Zt = O(String.prototype.indexOf), Jt = O(String.prototype.trim), D = O(Object.prototype.hasOwnProperty), S = O(RegExp.prototype.test), J = Qt(TypeError); function O(r) { return function (o) { o instanceof RegExp && (o.lastIndex = 0); for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), f = 1; f < l; f++)a[f - 1] = arguments[f]; return ke(r, o, a) } } c(O, "unapply"); function Qt(r) { return function () { for (var o = arguments.length, l = new Array(o), a = 0; a < o; a++)l[a] = arguments[a]; return Ue(r, l) } } c(Qt, "unconstruct"); function s(r, o) { let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : me; ft && ft(r, null); let a = o.length; for (; a--;) { let f = o[a]; if (typeof f == "string") { let y = l(f); y !== f && (jt(o) || (o[a] = y), f = y) } r[f] = !0 } return r } c(s, "addToSet"); function en(r) { for (let o = 0; o < r.length; o++)D(r, o) || (r[o] = null); return r } c(en, "cleanArray"); function w(r) { let o = ve(null); for (let [l, a] of gt(r)) D(r, l) && (Array.isArray(a) ? o[l] = en(a) : a && typeof a == "object" && a.constructor === Object ? o[l] = w(a) : o[l] = a); return o } c(w, "clone"); function Q(r, o) { for (; r !== null;) { let a = $t(r, o); if (a) { if (a.get) return O(a.get); if (typeof a.value == "function") return O(a.value) } r = Vt(r) } function l() { return null } return c(l, "fallbackValue"), l } c(Q, "lookupGetter"); var mt = R(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Me = R(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), we = R(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), tn = R(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), xe = R(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), nn = R(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), pt = R(["#text"]), dt = R(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Pe = R(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Tt = R(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), ue = R(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), on = b(/\{\{[\w\W]*|[\w\W]*\}\}/gm), an = b(/<%[\w\W]*|[\w\W]*%>/gm), rn = b(/\$\{[\w\W]*/gm), sn = b(/^data-[\-\w.\u00B7-\uFFFF]+$/), ln = b(/^aria-[\-\w]+$/), ht = b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), cn = b(/^(?:\w+script|data):/i), fn = b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), At = b(/^html$/i), un = b(/^[a-z][.\w]*(-[.\w]+)+$/i), Et = Object.freeze({ __proto__: null, ARIA_ATTR: ln, ATTR_WHITESPACE: fn, CUSTOM_ELEMENT: un, DATA_ATTR: sn, DOCTYPE_NAME: At, ERB_EXPR: an, IS_ALLOWED_URI: ht, IS_SCRIPT_OR_DATA: cn, MUSTACHE_EXPR: on, TMPLIT_EXPR: rn }), ee = { element: 1, attribute: 2, text: 3, cdataSection: 4, entityReference: 5, entityNode: 6, progressingInstruction: 7, comment: 8, document: 9, documentType: 10, documentFragment: 11, notation: 12 }, mn = c(function () { return typeof window > "u" ? null : window }, "getGlobal"), pn = c(function (o, l) { if (typeof o != "object" || typeof o.createPolicy != "function") return null; let a = null, f = "data-tt-policy-suffix"; l && l.hasAttribute(f) && (a = l.getAttribute(f)); let y = "dompurify" + (a ? "#" + a : ""); try { return o.createPolicy(y, { createHTML(v) { return v }, createScriptURL(v) { return v } }) } catch { return console.warn("TrustedTypes policy " + y + " could not be created."), null } }, "_createTrustedTypesPolicy"), _t = c(function () { return { afterSanitizeAttributes: [], afterSanitizeElements: [], afterSanitizeShadowDOM: [], beforeSanitizeAttributes: [], beforeSanitizeElements: [], beforeSanitizeShadowDOM: [], uponSanitizeAttribute: [], uponSanitizeElement: [], uponSanitizeShadowNode: [] } }, "_createHooksMap"); function St() { let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : mn(), o = c(i => St(i), "DOMPurify"); if (o.version = "3.3.0", o.removed = [], !r || !r.document || r.document.nodeType !== ee.document || !r.Element) return o.isSupported = !1, o; let { document: l } = r, a = l, f = a.currentScript, { DocumentFragment: y, HTMLTemplateElement: v, Node: pe, Element: Fe, NodeFilter: Y, NamedNodeMap: Rt = r.NamedNodeMap || r.MozNamedAttrMap, HTMLFormElement: Ot, DOMParser: yt, trustedTypes: te } = r, X = Fe.prototype, Lt = Q(X, "cloneNode"), bt = Q(X, "remove"), Dt = Q(X, "nextSibling"), Nt = Q(X, "childNodes"), ne = Q(X, "parentNode"); if (typeof v == "function") { let i = l.createElement("template"); i.content && i.content.ownerDocument && (l = i.content.ownerDocument) } let h, j = "", { implementation: de, createNodeIterator: It, createDocumentFragment: Ct, getElementsByTagName: Mt } = l, { importNode: wt } = a, A = _t(); o.isSupported = typeof gt == "function" && typeof ne == "function" && de && de.createHTMLDocument !== void 0; let { MUSTACHE_EXPR: Te, ERB_EXPR: Ee, TMPLIT_EXPR: _e, DATA_ATTR: xt, ARIA_ATTR: Pt, IS_SCRIPT_OR_DATA: vt, ATTR_WHITESPACE: He, CUSTOM_ELEMENT: kt } = Et, { IS_ALLOWED_URI: ze } = Et, d = null, Ge = s({}, [...mt, ...Me, ...we, ...xe, ...pt]), E = null, We = s({}, [...dt, ...Pe, ...Tt, ...ue]), m = Object.seal(ve(null, { tagNameCheck: { writable: !0, configurable: !1, enumerable: !0, value: null }, attributeNameCheck: { writable: !0, configurable: !1, enumerable: !0, value: null }, allowCustomizedBuiltInElements: { writable: !0, configurable: !1, enumerable: !0, value: !1 } })), V = null, ge = null, k = Object.seal(ve(null, { tagCheck: { writable: !0, configurable: !1, enumerable: !0, value: null }, attributeCheck: { writable: !0, configurable: !1, enumerable: !0, value: null } })), Be = !0, he = !0, Ye = !1, Xe = !0, U = !1, oe = !0, x = !1, Ae = !1, Se = !1, F = !1, ie = !1, ae = !1, je = !0, Ve = !1, Ut = "user-content-", Re = !0, $ = !1, H = {}, z = null, $e = s({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]), qe = null, Ke = s({}, ["audio", "video", "img", "source", "image", "track"]), Oe = null, Ze = s({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), re = "http://www.w3.org/1998/Math/MathML", se = "http://www.w3.org/2000/svg", I = "http://www.w3.org/1999/xhtml", G = I, ye = !1, Le = null, Ft = s({}, [re, se, I], Ie), le = s({}, ["mi", "mo", "mn", "ms", "mtext"]), ce = s({}, ["annotation-xml"]), Ht = s({}, ["title", "style", "font", "a", "script"]), q = null, zt = ["application/xhtml+xml", "text/html"], Gt = "text/html", T = null, W = null, Wt = l.createElement("form"), Je = c(function (e) { return e instanceof RegExp || e instanceof Function }, "isRegexOrFunction"), be = c(function () { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; if (!(W && W === e)) { if ((!e || typeof e != "object") && (e = {}), e = w(e), q = zt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? Gt : e.PARSER_MEDIA_TYPE, T = q === "application/xhtml+xml" ? Ie : me, d = D(e, "ALLOWED_TAGS") ? s({}, e.ALLOWED_TAGS, T) : Ge, E = D(e, "ALLOWED_ATTR") ? s({}, e.ALLOWED_ATTR, T) : We, Le = D(e, "ALLOWED_NAMESPACES") ? s({}, e.ALLOWED_NAMESPACES, Ie) : Ft, Oe = D(e, "ADD_URI_SAFE_ATTR") ? s(w(Ze), e.ADD_URI_SAFE_ATTR, T) : Ze, qe = D(e, "ADD_DATA_URI_TAGS") ? s(w(Ke), e.ADD_DATA_URI_TAGS, T) : Ke, z = D(e, "FORBID_CONTENTS") ? s({}, e.FORBID_CONTENTS, T) : $e, V = D(e, "FORBID_TAGS") ? s({}, e.FORBID_TAGS, T) : w({}), ge = D(e, "FORBID_ATTR") ? s({}, e.FORBID_ATTR, T) : w({}), H = D(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Be = e.ALLOW_ARIA_ATTR !== !1, he = e.ALLOW_DATA_ATTR !== !1, Ye = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Xe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, U = e.SAFE_FOR_TEMPLATES || !1, oe = e.SAFE_FOR_XML !== !1, x = e.WHOLE_DOCUMENT || !1, F = e.RETURN_DOM || !1, ie = e.RETURN_DOM_FRAGMENT || !1, ae = e.RETURN_TRUSTED_TYPE || !1, Se = e.FORCE_BODY || !1, je = e.SANITIZE_DOM !== !1, Ve = e.SANITIZE_NAMED_PROPS || !1, Re = e.KEEP_CONTENT !== !1, $ = e.IN_PLACE || !1, ze = e.ALLOWED_URI_REGEXP || ht, G = e.NAMESPACE || I, le = e.MATHML_TEXT_INTEGRATION_POINTS || le, ce = e.HTML_INTEGRATION_POINTS || ce, m = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Je(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (m.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Je(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (m.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (m.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), U && (he = !1), ie && (F = !0), H && (d = s({}, pt), E = [], H.html === !0 && (s(d, mt), s(E, dt)), H.svg === !0 && (s(d, Me), s(E, Pe), s(E, ue)), H.svgFilters === !0 && (s(d, we), s(E, Pe), s(E, ue)), H.mathMl === !0 && (s(d, xe), s(E, Tt), s(E, ue))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? k.tagCheck = e.ADD_TAGS : (d === Ge && (d = w(d)), s(d, e.ADD_TAGS, T))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? k.attributeCheck = e.ADD_ATTR : (E === We && (E = w(E)), s(E, e.ADD_ATTR, T))), e.ADD_URI_SAFE_ATTR && s(Oe, e.ADD_URI_SAFE_ATTR, T), e.FORBID_CONTENTS && (z === $e && (z = w(z)), s(z, e.FORBID_CONTENTS, T)), Re && (d["#text"] = !0), x && s(d, ["html", "head", "body"]), d.table && (s(d, ["tbody"]), delete V.tbody), e.TRUSTED_TYPES_POLICY) { if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.'); if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.'); h = e.TRUSTED_TYPES_POLICY, j = h.createHTML("") } else h === void 0 && (h = pn(te, f)), h !== null && typeof j == "string" && (j = h.createHTML("")); R && R(e), W = e } }, "_parseConfig"), Qe = s({}, [...Me, ...we, ...tn]), et = s({}, [...xe, ...nn]), Bt = c(function (e) { let t = ne(e); (!t || !t.tagName) && (t = { namespaceURI: G, tagName: "template" }); let n = me(e.tagName), u = me(t.tagName); return Le[e.namespaceURI] ? e.namespaceURI === se ? t.namespaceURI === I ? n === "svg" : t.namespaceURI === re ? n === "svg" && (u === "annotation-xml" || le[u]) : !!Qe[n] : e.namespaceURI === re ? t.namespaceURI === I ? n === "math" : t.namespaceURI === se ? n === "math" && ce[u] : !!et[n] : e.namespaceURI === I ? t.namespaceURI === se && !ce[u] || t.namespaceURI === re && !le[u] ? !1 : !et[n] && (Ht[n] || !Qe[n]) : !!(q === "application/xhtml+xml" && Le[e.namespaceURI]) : !1 }, "_checkValidNamespace"), N = c(function (e) { K(o.removed, { element: e }); try { ne(e).removeChild(e) } catch { bt(e) } }, "_forceRemove"), P = c(function (e, t) { try { K(o.removed, { attribute: t.getAttributeNode(e), from: t }) } catch { K(o.removed, { attribute: null, from: t }) } if (t.removeAttribute(e), e === "is") if (F || ie) try { N(t) } catch {} else try { t.setAttribute(e, "") } catch {} }, "_removeAttribute"), tt = c(function (e) { let t = null, n = null; if (Se) e = "" + e; else { let p = Ce(e, /^[\r\n\t ]+/); n = p && p[0] } q === "application/xhtml+xml" && G === I && (e = '
' + e + ""); let u = h ? h.createHTML(e) : e; if (G === I) try { t = new yt().parseFromString(u, q) } catch {} if (!t || !t.documentElement) { t = de.createDocument(G, "template", null); try { t.documentElement.innerHTML = ye ? j : u } catch {} } let g = t.body || t.documentElement; return e && n && g.insertBefore(l.createTextNode(n), g.childNodes[0] || null), G === I ? Mt.call(t, x ? "html" : "body")[0] : x ? t.documentElement : g }, "_initDocument"), nt = c(function (e) { return It.call(e.ownerDocument || e, e, Y.SHOW_ELEMENT | Y.SHOW_COMMENT | Y.SHOW_TEXT | Y.SHOW_PROCESSING_INSTRUCTION | Y.SHOW_CDATA_SECTION, null) }, "_createNodeIterator"), De = c(function (e) { return e instanceof Ot && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof Rt) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function") }, "_isClobbered"), ot = c(function (e) { return typeof pe == "function" && e instanceof pe }, "_isNode"); function C(i, e, t) { fe(i, n => { n.call(o, e, t, W) }) } c(C, "_executeHooks"); let it = c(function (e) { let t = null; if (C(A.beforeSanitizeElements, e, null), De(e)) return N(e), !0; let n = T(e.nodeName); if (C(A.uponSanitizeElement, e, { tagName: n, allowedTags: d }), oe && e.hasChildNodes() && !ot(e.firstElementChild) && S(/<[/\w!]/g, e.innerHTML) && S(/<[/\w!]/g, e.textContent) || e.nodeType === ee.progressingInstruction || oe && e.nodeType === ee.comment && S(/<[/\w]/g, e.data)) return N(e), !0; if (!(k.tagCheck instanceof Function && k.tagCheck(n)) && (!d[n] || V[n])) { if (!V[n] && rt(n) && (m.tagNameCheck instanceof RegExp && S(m.tagNameCheck, n) || m.tagNameCheck instanceof Function && m.tagNameCheck(n))) return !1; if (Re && !z[n]) { let u = ne(e) || e.parentNode, g = Nt(e) || e.childNodes; if (g && u) { let p = g.length; for (let L = p - 1; L >= 0; --L) { let M = Lt(g[L], !0); M.__removalCount = (e.__removalCount || 0) + 1, u.insertBefore(M, Dt(e)) } } } return N(e), !0 } return e instanceof Fe && !Bt(e) || (n === "noscript" || n === "noembed" || n === "noframes") && S(/<\/no(script|embed|frames)/i, e.innerHTML) ? (N(e), !0) : (U && e.nodeType === ee.text && (t = e.textContent, fe([Te, Ee, _e], u => { t = Z(t, u, " ") }), e.textContent !== t && (K(o.removed, { element: e.cloneNode() }), e.textContent = t)), C(A.afterSanitizeElements, e, null), !1) }, "_sanitizeElements"), at = c(function (e, t, n) { if (je && (t === "id" || t === "name") && (n in l || n in Wt)) return !1; if (!(he && !ge[t] && S(xt, t))) { if (!(Be && S(Pt, t))) { if (!(k.attributeCheck instanceof Function && k.attributeCheck(t, e))) { if (!E[t] || ge[t]) { if (!(rt(e) && (m.tagNameCheck instanceof RegExp && S(m.tagNameCheck, e) || m.tagNameCheck instanceof Function && m.tagNameCheck(e)) && (m.attributeNameCheck instanceof RegExp && S(m.attributeNameCheck, t) || m.attributeNameCheck instanceof Function && m.attributeNameCheck(t, e)) || t === "is" && m.allowCustomizedBuiltInElements && (m.tagNameCheck instanceof RegExp && S(m.tagNameCheck, n) || m.tagNameCheck instanceof Function && m.tagNameCheck(n)))) return !1 } else if (!Oe[t]) { if (!S(ze, Z(n, He, ""))) { if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Zt(n, "data:") === 0 && qe[e])) { if (!(Ye && !S(vt, Z(n, He, "")))) { if (n) return !1 } } } } } } } return !0 }, "_isValidAttribute"), rt = c(function (e) { return e !== "annotation-xml" && Ce(e, kt) }, "_isBasicCustomElement"), st = c(function (e) { C(A.beforeSanitizeAttributes, e, null); let { attributes: t } = e; if (!t || De(e)) return; let n = { attrName: "", attrValue: "", keepAttr: !0, allowedAttributes: E, forceKeepAttr: void 0 }, u = t.length; for (; u--;) { let g = t[u], { name: p, namespaceURI: L, value: M } = g, B = T(p), Ne = M, _ = p === "value" ? Ne : Jt(Ne); if (n.attrName = B, n.attrValue = _, n.keepAttr = !0, n.forceKeepAttr = void 0, C(A.uponSanitizeAttribute, e, n), _ = n.attrValue, Ve && (B === "id" || B === "name") && (P(p, e), _ = Ut + _), oe && S(/((--!?|])>)|<\/(style|title|textarea)/i, _)) { P(p, e); continue } if (B === "attributename" && Ce(_, "href")) { P(p, e); continue } if (n.forceKeepAttr) continue; if (!n.keepAttr) { P(p, e); continue } if (!Xe && S(/\/>/i, _)) { P(p, e); continue } U && fe([Te, Ee, _e], ct => { _ = Z(_, ct, " ") }); let lt = T(e.nodeName); if (!at(lt, B, _)) { P(p, e); continue } if (h && typeof te == "object" && typeof te.getAttributeType == "function" && !L) switch (te.getAttributeType(lt, B)) { case "TrustedHTML": { _ = h.createHTML(_); break } case "TrustedScriptURL": { _ = h.createScriptURL(_); break } }if (_ !== Ne) try { L ? e.setAttributeNS(L, p, _) : e.setAttribute(p, _), De(e) ? N(e) : ut(o.removed) } catch { P(p, e) } } C(A.afterSanitizeAttributes, e, null) }, "_sanitizeAttributes"), Yt = c(function i(e) { let t = null, n = nt(e); for (C(A.beforeSanitizeShadowDOM, e, null); t = n.nextNode();)C(A.uponSanitizeShadowNode, t, null), it(t), st(t), t.content instanceof y && i(t.content); C(A.afterSanitizeShadowDOM, e, null) }, "_sanitizeShadowDOM"); return o.sanitize = function (i) { let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, n = null, u = null, g = null; if (ye = !i, ye && (i = ""), typeof i != "string" && !ot(i)) if (typeof i.toString == "function") { if (i = i.toString(), typeof i != "string") throw J("dirty is not a string, aborting") } else throw J("toString is not a function"); if (!o.isSupported) return i; if (Ae || be(e), o.removed = [], typeof i == "string" && ($ = !1), $) { if (i.nodeName) { let M = T(i.nodeName); if (!d[M] || V[M]) throw J("root node is forbidden and cannot be sanitized in-place") } } else if (i instanceof pe) t = tt(""), n = t.ownerDocument.importNode(i, !0), n.nodeType === ee.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? t = n : t.appendChild(n); else { if (!F && !U && !x && i.indexOf("<") === -1) return h && ae ? h.createHTML(i) : i; if (t = tt(i), !t) return F ? null : ae ? j : "" } t && Se && N(t.firstChild); let p = nt($ ? i : t); for (; u = p.nextNode();)it(u), st(u), u.content instanceof y && Yt(u.content); if ($) return i; if (F) { if (ie) for (g = Ct.call(t.ownerDocument); t.firstChild;)g.appendChild(t.firstChild); else g = t; return (E.shadowroot || E.shadowrootmode) && (g = wt.call(a, g, !0)), g } let L = x ? t.outerHTML : t.innerHTML; return x && d["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && S(At, t.ownerDocument.doctype.name) && (L = "` + L), U && fe([Te, Ee, _e], M => { L = Z(L, M, " ") }), h && ae ? h.createHTML(L) : L }, o.setConfig = function () { let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; be(i), Ae = !0 }, o.clearConfig = function () { W = null, Ae = !1 }, o.isValidAttribute = function (i, e, t) { W || be({}); let n = T(i), u = T(e); return at(n, u, t) }, o.addHook = function (i, e) { typeof e == "function" && K(A[i], e) }, o.removeHook = function (i, e) { if (e !== void 0) { let t = qt(A[i], e); return t === -1 ? void 0 : Kt(A[i], t, 1)[0] } return ut(A[i]) }, o.removeHooks = function (i) { A[i] = [] }, o.removeAllHooks = function () { A = _t() }, o } c(St, "createDOMPurify"); var DOMPurify = St();
+
// Create a custom CSP policy (using DOM Purify for added security)
let goodTube_csp = false;
if (window.trustedTypes && window.trustedTypes.createPolicy && DOMPurify) {
diff --git a/goodtube.min.js b/goodtube.min.js
index d9702e3..2f2150c 100644
--- a/goodtube.min.js
+++ b/goodtube.min.js
@@ -1,9 +1,8 @@
-(()=>{var{entries:Wo,setPrototypeOf:Bo,isFrozen:ni,getPrototypeOf:ai,getOwnPropertyDescriptor:ri}=Object,{freeze:H,seal:K,create:co}=Object,{apply:fo,construct:po}=typeof Reflect<"u"&&Reflect;H||(H=function(s){return s});K||(K=function(s){return s});fo||(fo=function(s,a){for(var c=arguments.length,b=new Array(c>2?c-2:0),B=2;B1?a-1:0),b=1;b1?a-1:0),b=1;b2&&arguments[2]!==void 0?arguments[2]:Ht;Bo&&Bo(p,null);let c=s.length;for(;c--;){let b=s[c];if(typeof b=="string"){let B=a(b);B!==b&&(ni(s)||(s[c]=B),b=B)}p[b]=!0}return p}function fi(p){for(let s=0;s/gm),yi=K(/\$\{[\w\W]*/gm),_i=K(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ti=K(/^aria-[\-\w]+$/),Qo=K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),hi=K(/^(?:\w+script|data):/i),xi=K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jo=K(/^html$/i),vi=K(/^[a-z][.\w]*(-[.\w]+)+$/i),Yo=Object.freeze({__proto__:null,ARIA_ATTR:Ti,ATTR_WHITESPACE:xi,CUSTOM_ELEMENT:vi,DATA_ATTR:_i,DOCTYPE_NAME:jo,ERB_EXPR:bi,IS_ALLOWED_URI:Qo,IS_SCRIPT_OR_DATA:hi,MUSTACHE_EXPR:gi,TMPLIT_EXPR:yi}),vt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ai=function(){return typeof window>"u"?null:window},Ei=function(s,a){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let c=null,b="data-tt-policy-suffix";a&&a.hasAttribute(b)&&(c=a.getAttribute(b));let B="dompurify"+(c?"#"+c:"");try{return s.createPolicy(B,{createHTML(F){return F},createScriptURL(F){return F}})}catch{return console.warn("TrustedTypes policy "+B+" could not be created."),null}},Go=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function qo(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ai(),s=u=>qo(u);if(s.version="3.3.0",s.removed=[],!p||!p.document||p.document.nodeType!==vt.document||!p.Element)return s.isSupported=!1,s;let{document:a}=p,c=a,b=c.currentScript,{DocumentFragment:B,HTMLTemplateElement:F,Node:ye,Element:V,NodeFilter:re,NamedNodeMap:Fe=p.NamedNodeMap||p.MozNamedAttrMap,HTMLFormElement:Yt,DOMParser:le,trustedTypes:R}=p,r=V.prototype,f=xt(r,"cloneNode"),we=xt(r,"remove"),at=xt(r,"nextSibling"),At=xt(r,"childNodes"),ke=xt(r,"parentNode");if(typeof F=="function"){let u=a.createElement("template");u.content&&u.content.ownerDocument&&(a=u.content.ownerDocument)}let C,_e="",{implementation:Ue,createNodeIterator:rt,createDocumentFragment:se,getElementsByTagName:Ve}=a,{importNode:v}=c,D=Go();s.isSupported=typeof Wo=="function"&&typeof ke=="function"&&Ue&&Ue.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:te,ERB_EXPR:de,TMPLIT_EXPR:ue,DATA_ATTR:ze,ARIA_ATTR:He,IS_SCRIPT_OR_DATA:Ye,ATTR_WHITESPACE:Te,CUSTOM_ELEMENT:Ge}=Yo,{IS_ALLOWED_URI:j}=Yo,E=null,S=g({},[...Uo,...ro,...lo,...so,...Vo]),M=null,Et=g({},[...zo,...uo,...Ho,...zt]),I=Object.seal(co(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),oe=null,Se=null,he=Object.seal(co(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),wt=!0,lt=!0,kt=!1,st=!0,ce=!1,xe=!0,fe=!1,We=!1,Ie=!1,pe=!1,Le=!1,me=!1,Qe=!0,De=!1,St="user-content-",dt=!0,ie=!1,J={},ve=null,ut=g({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ct=null,It=g({},["audio","video","img","source","image","track"]),ft=null,Lt=g({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),je="http://www.w3.org/1998/Math/MathML",qe="http://www.w3.org/2000/svg",q="http://www.w3.org/1999/xhtml",ge=q,Ze=!1,Me=null,Ke=g({},[je,qe,q],no),Re=g({},["mi","mo","mn","ms","mtext"]),Ce=g({},["annotation-xml"]),Gt=g({},["title","style","font","a","script"]),Oe=null,Wt=["application/xhtml+xml","text/html"],Qt="text/html",A=null,Ae=null,jt=a.createElement("form"),pt=function(t){return t instanceof RegExp||t instanceof Function},Je=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ae&&Ae===t)){if((!t||typeof t!="object")&&(t={}),t=be(t),Oe=Wt.indexOf(t.PARSER_MEDIA_TYPE)===-1?Qt:t.PARSER_MEDIA_TYPE,A=Oe==="application/xhtml+xml"?no:Ht,E=ee(t,"ALLOWED_TAGS")?g({},t.ALLOWED_TAGS,A):S,M=ee(t,"ALLOWED_ATTR")?g({},t.ALLOWED_ATTR,A):Et,Me=ee(t,"ALLOWED_NAMESPACES")?g({},t.ALLOWED_NAMESPACES,no):Ke,ft=ee(t,"ADD_URI_SAFE_ATTR")?g(be(Lt),t.ADD_URI_SAFE_ATTR,A):Lt,ct=ee(t,"ADD_DATA_URI_TAGS")?g(be(It),t.ADD_DATA_URI_TAGS,A):It,ve=ee(t,"FORBID_CONTENTS")?g({},t.FORBID_CONTENTS,A):ut,oe=ee(t,"FORBID_TAGS")?g({},t.FORBID_TAGS,A):be({}),Se=ee(t,"FORBID_ATTR")?g({},t.FORBID_ATTR,A):be({}),J=ee(t,"USE_PROFILES")?t.USE_PROFILES:!1,wt=t.ALLOW_ARIA_ATTR!==!1,lt=t.ALLOW_DATA_ATTR!==!1,kt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,st=t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ce=t.SAFE_FOR_TEMPLATES||!1,xe=t.SAFE_FOR_XML!==!1,fe=t.WHOLE_DOCUMENT||!1,pe=t.RETURN_DOM||!1,Le=t.RETURN_DOM_FRAGMENT||!1,me=t.RETURN_TRUSTED_TYPE||!1,Ie=t.FORCE_BODY||!1,Qe=t.SANITIZE_DOM!==!1,De=t.SANITIZE_NAMED_PROPS||!1,dt=t.KEEP_CONTENT!==!1,ie=t.IN_PLACE||!1,j=t.ALLOWED_URI_REGEXP||Qo,ge=t.NAMESPACE||q,Re=t.MATHML_TEXT_INTEGRATION_POINTS||Re,Ce=t.HTML_INTEGRATION_POINTS||Ce,I=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&pt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(I.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&pt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(I.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(I.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ce&&(lt=!1),Le&&(pe=!0),J&&(E=g({},Vo),M=[],J.html===!0&&(g(E,Uo),g(M,zo)),J.svg===!0&&(g(E,ro),g(M,uo),g(M,zt)),J.svgFilters===!0&&(g(E,lo),g(M,uo),g(M,zt)),J.mathMl===!0&&(g(E,so),g(M,Ho),g(M,zt))),t.ADD_TAGS&&(typeof t.ADD_TAGS=="function"?he.tagCheck=t.ADD_TAGS:(E===S&&(E=be(E)),g(E,t.ADD_TAGS,A))),t.ADD_ATTR&&(typeof t.ADD_ATTR=="function"?he.attributeCheck=t.ADD_ATTR:(M===Et&&(M=be(M)),g(M,t.ADD_ATTR,A))),t.ADD_URI_SAFE_ATTR&&g(ft,t.ADD_URI_SAFE_ATTR,A),t.FORBID_CONTENTS&&(ve===ut&&(ve=be(ve)),g(ve,t.FORBID_CONTENTS,A)),dt&&(E["#text"]=!0),fe&&g(E,["html","head","body"]),E.table&&(g(E,["tbody"]),delete oe.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw ht('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ht('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=t.TRUSTED_TYPES_POLICY,_e=C.createHTML("")}else C===void 0&&(C=Ei(R,b)),C!==null&&typeof _e=="string"&&(_e=C.createHTML(""));H&&H(t),Ae=t}},mt=g({},[...ro,...lo,...pi]),gt=g({},[...so,...mi]),Dt=function(t){let n=ke(t);(!n||!n.tagName)&&(n={namespaceURI:ge,tagName:"template"});let l=Ht(t.tagName),x=Ht(n.tagName);return Me[t.namespaceURI]?t.namespaceURI===qe?n.namespaceURI===q?l==="svg":n.namespaceURI===je?l==="svg"&&(x==="annotation-xml"||Re[x]):!!mt[l]:t.namespaceURI===je?n.namespaceURI===q?l==="math":n.namespaceURI===qe?l==="math"&&Ce[x]:!!gt[l]:t.namespaceURI===q?n.namespaceURI===qe&&!Ce[x]||n.namespaceURI===je&&!Re[x]?!1:!gt[l]&&(Gt[l]||!mt[l]):!!(Oe==="application/xhtml+xml"&&Me[t.namespaceURI]):!1},G=function(t){_t(s.removed,{element:t});try{ke(t).removeChild(t)}catch{we(t)}},ne=function(t,n){try{_t(s.removed,{attribute:n.getAttributeNode(t),from:n})}catch{_t(s.removed,{attribute:null,from:n})}if(n.removeAttribute(t),t==="is")if(pe||Le)try{G(n)}catch{}else try{n.setAttribute(t,"")}catch{}},bt=function(t){let n=null,l=null;if(Ie)t=""+t;else{let _=ao(t,/^[\r\n\t ]+/);l=_&&_[0]}Oe==="application/xhtml+xml"&&ge===q&&(t=''+t+"");let x=C?C.createHTML(t):t;if(ge===q)try{n=new le().parseFromString(x,Oe)}catch{}if(!n||!n.documentElement){n=Ue.createDocument(ge,"template",null);try{n.documentElement.innerHTML=Ze?_e:x}catch{}}let O=n.body||n.documentElement;return t&&l&&O.insertBefore(a.createTextNode(l),O.childNodes[0]||null),ge===q?Ve.call(n,fe?"html":"body")[0]:fe?n.documentElement:O},yt=function(t){return rt.call(t.ownerDocument||t,t,re.SHOW_ELEMENT|re.SHOW_COMMENT|re.SHOW_TEXT|re.SHOW_PROCESSING_INSTRUCTION|re.SHOW_CDATA_SECTION,null)},Xe=function(t){return t instanceof Yt&&(typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||!(t.attributes instanceof Fe)||typeof t.removeAttribute!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function")},Ne=function(t){return typeof ye=="function"&&t instanceof ye};function Z(u,t,n){Vt(u,l=>{l.call(s,t,n,Ae)})}let Mt=function(t){let n=null;if(Z(D.beforeSanitizeElements,t,null),Xe(t))return G(t),!0;let l=A(t.nodeName);if(Z(D.uponSanitizeElement,t,{tagName:l,allowedTags:E}),xe&&t.hasChildNodes()&&!Ne(t.firstElementChild)&&z(/<[/\w!]/g,t.innerHTML)&&z(/<[/\w!]/g,t.textContent)||t.nodeType===vt.progressingInstruction||xe&&t.nodeType===vt.comment&&z(/<[/\w]/g,t.data))return G(t),!0;if(!(he.tagCheck instanceof Function&&he.tagCheck(l))&&(!E[l]||oe[l])){if(!oe[l]&&Ct(l)&&(I.tagNameCheck instanceof RegExp&&z(I.tagNameCheck,l)||I.tagNameCheck instanceof Function&&I.tagNameCheck(l)))return!1;if(dt&&!ve[l]){let x=ke(t)||t.parentNode,O=At(t)||t.childNodes;if(O&&x){let _=O.length;for(let w=_-1;w>=0;--w){let P=f(O[w],!0);P.__removalCount=(t.__removalCount||0)+1,x.insertBefore(P,at(t))}}}return G(t),!0}return t instanceof V&&!Dt(t)||(l==="noscript"||l==="noembed"||l==="noframes")&&z(/<\/no(script|embed|frames)/i,t.innerHTML)?(G(t),!0):(ce&&t.nodeType===vt.text&&(n=t.textContent,Vt([te,de,ue],x=>{n=Tt(n,x," ")}),t.textContent!==n&&(_t(s.removed,{element:t.cloneNode()}),t.textContent=n)),Z(D.afterSanitizeElements,t,null),!1)},Rt=function(t,n,l){if(Qe&&(n==="id"||n==="name")&&(l in a||l in jt))return!1;if(!(lt&&!Se[n]&&z(ze,n))){if(!(wt&&z(He,n))){if(!(he.attributeCheck instanceof Function&&he.attributeCheck(n,t))){if(!M[n]||Se[n]){if(!(Ct(t)&&(I.tagNameCheck instanceof RegExp&&z(I.tagNameCheck,t)||I.tagNameCheck instanceof Function&&I.tagNameCheck(t))&&(I.attributeNameCheck instanceof RegExp&&z(I.attributeNameCheck,n)||I.attributeNameCheck instanceof Function&&I.attributeNameCheck(n,t))||n==="is"&&I.allowCustomizedBuiltInElements&&(I.tagNameCheck instanceof RegExp&&z(I.tagNameCheck,l)||I.tagNameCheck instanceof Function&&I.tagNameCheck(l))))return!1}else if(!ft[n]){if(!z(j,Tt(l,Te,""))){if(!((n==="src"||n==="xlink:href"||n==="href")&&t!=="script"&&di(l,"data:")===0&&ct[t])){if(!(kt&&!z(Ye,Tt(l,Te,"")))){if(l)return!1}}}}}}}return!0},Ct=function(t){return t!=="annotation-xml"&&ao(t,Ge)},Ot=function(t){Z(D.beforeSanitizeAttributes,t,null);let{attributes:n}=t;if(!n||Xe(t))return;let l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:M,forceKeepAttr:void 0},x=n.length;for(;x--;){let O=n[x],{name:_,namespaceURI:w,value:P}=O,W=A(_),X=P,k=_==="value"?X:ui(X);if(l.attrName=W,l.attrValue=k,l.keepAttr=!0,l.forceKeepAttr=void 0,Z(D.uponSanitizeAttribute,t,l),k=l.attrValue,De&&(W==="id"||W==="name")&&(ne(_,t),k=St+k),xe&&z(/((--!?|])>)|<\/(style|title|textarea)/i,k)){ne(_,t);continue}if(W==="attributename"&&ao(k,"href")){ne(_,t);continue}if(l.forceKeepAttr)continue;if(!l.keepAttr){ne(_,t);continue}if(!st&&z(/\/>/i,k)){ne(_,t);continue}ce&&Vt([te,de,ue],L=>{k=Tt(k,L," ")});let y=A(t.nodeName);if(!Rt(y,W,k)){ne(_,t);continue}if(C&&typeof R=="object"&&typeof R.getAttributeType=="function"&&!w)switch(R.getAttributeType(y,W)){case"TrustedHTML":{k=C.createHTML(k);break}case"TrustedScriptURL":{k=C.createScriptURL(k);break}}if(k!==X)try{w?t.setAttributeNS(w,_,k):t.setAttribute(_,k),Xe(t)?G(t):Fo(s.removed)}catch{ne(_,t)}}Z(D.afterSanitizeAttributes,t,null)},Nt=function u(t){let n=null,l=yt(t);for(Z(D.beforeSanitizeShadowDOM,t,null);n=l.nextNode();)Z(D.uponSanitizeShadowNode,n,null),Mt(n),Ot(n),n.content instanceof B&&u(n.content);Z(D.afterSanitizeShadowDOM,t,null)};return s.sanitize=function(u){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=null,l=null,x=null,O=null;if(Ze=!u,Ze&&(u=""),typeof u!="string"&&!Ne(u))if(typeof u.toString=="function"){if(u=u.toString(),typeof u!="string")throw ht("dirty is not a string, aborting")}else throw ht("toString is not a function");if(!s.isSupported)return u;if(We||Je(t),s.removed=[],typeof u=="string"&&(ie=!1),ie){if(u.nodeName){let P=A(u.nodeName);if(!E[P]||oe[P])throw ht("root node is forbidden and cannot be sanitized in-place")}}else if(u instanceof ye)n=bt(""),l=n.ownerDocument.importNode(u,!0),l.nodeType===vt.element&&l.nodeName==="BODY"||l.nodeName==="HTML"?n=l:n.appendChild(l);else{if(!pe&&!ce&&!fe&&u.indexOf("<")===-1)return C&&me?C.createHTML(u):u;if(n=bt(u),!n)return pe?null:me?_e:""}n&&Ie&&G(n.firstChild);let _=yt(ie?u:n);for(;x=_.nextNode();)Mt(x),Ot(x),x.content instanceof B&&Nt(x.content);if(ie)return u;if(pe){if(Le)for(O=se.call(n.ownerDocument);n.firstChild;)O.appendChild(n.firstChild);else O=n;return(M.shadowroot||M.shadowrootmode)&&(O=v.call(c,O,!0)),O}let w=fe?n.outerHTML:n.innerHTML;return fe&&E["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&z(jo,n.ownerDocument.doctype.name)&&(w="
-`+w),ce&&Vt([te,de,ue],P=>{w=Tt(w,P," ")}),C&&me?C.createHTML(w):w},s.setConfig=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Je(u),We=!0},s.clearConfig=function(){Ae=null,We=!1},s.isValidAttribute=function(u,t,n){Ae||Je({});let l=A(u),x=A(t);return Rt(l,x,n)},s.addHook=function(u,t){typeof t=="function"&&_t(D[u],t)},s.removeHook=function(u,t){if(t!==void 0){let n=li(D[u],t);return n===-1?void 0:si(D[u],n,1)[0]}return Fo(D[u])},s.removeHooks=function(u){D[u]=[]},s.removeAllHooks=function(){D=Go()},s}var mo=qo();(function(){"use strict";let p=!1;window.trustedTypes&&window.trustedTypes.createPolicy&&mo&&(p=window.trustedTypes.createPolicy("GoodTubePolicy",{createHTML:e=>mo.sanitize(e,{RETURN_TRUSTED_TYPE:!1})}));function s(){let e={};if(document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g,function(){function o(i){return decodeURIComponent(i.split("+").join(" "))}e[o(arguments[1])]=o(arguments[2])}),V()&&typeof e.v>"u"){let o="";window.location.href.indexOf("/watch/")!==-1?o="/watch/":o="/live/";let i=window.location.href.split(o);if(i.length===2){let d=i[1].split("?");e.v=d[d.length-1]}}return e}function a(e,o,i=399){e=e+"_new",document.cookie=e+"="+encodeURIComponent(o)+";SameSite=Lax;path=/;max-age="+i*24*60*60}function c(e){e=e+"_new";let o=document.cookie.split(";");for(let i=0;i{(function(){"use strict";var Gi=Object.defineProperty,f=(e,t)=>Gi(e,"name",{value:t,configurable:!0}),{entries:po,setPrototypeOf:fo,isFrozen:Qi,getPrototypeOf:ji,getOwnPropertyDescriptor:qi}=Object,{freeze:C,seal:z,create:kt}=Object,{apply:wt,construct:At}=typeof Reflect<"u"&&Reflect;C||(C=f(function(e){return e},"freeze")),z||(z=f(function(e){return e},"seal")),wt||(wt=f(function(e,t){for(var i=arguments.length,a=new Array(i>2?i-2:0),l=2;l1?t-1:0),a=1;a1?i-1:0),l=1;l2&&arguments[2]!==void 0?arguments[2]:Qe;fo&&fo(e,null);let a=t.length;for(;a--;){let l=t[a];if(typeof l=="string"){let u=i(l);u!==l&&(Qi(t)||(t[a]=u),l=u)}e[l]=!0}return e}f(c,"addToSet");function bo(e){for(let t=0;t/gm),oa=z(/\$\{[\w\W]*/gm),ia=z(/^data-[\-\w.\u00B7-\uFFFF]+$/),aa=z(/^aria-[\-\w]+$/),xo=z(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),na=z(/^(?:\w+script|data):/i),ra=z(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vo=z(/^html$/i),da=z(/^[a-z][.\w]*(-[.\w]+)+$/i),ko=Object.freeze({__proto__:null,ARIA_ATTR:aa,ATTR_WHITESPACE:ra,CUSTOM_ELEMENT:da,DATA_ATTR:ia,DOCTYPE_NAME:vo,ERB_EXPR:ta,IS_ALLOWED_URI:xo,IS_SCRIPT_OR_DATA:na,MUSTACHE_EXPR:ea,TMPLIT_EXPR:oa}),Re={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},la=f(function(){return typeof window>"u"?null:window},"getGlobal"),sa=f(function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null,a="data-tt-policy-suffix";t&&t.hasAttribute(a)&&(i=t.getAttribute(a));let l="dompurify"+(i?"#"+i:"");try{return e.createPolicy(l,{createHTML(u){return u},createScriptURL(u){return u}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},"_createTrustedTypesPolicy"),wo=f(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap");function Ct(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:la(),t=f(o=>Ct(o),"DOMPurify");if(t.version="3.3.0",t.removed=[],!e||!e.document||e.document.nodeType!==Re.document||!e.Element)return t.isSupported=!1,t;let{document:i}=e,a=i,l=a.currentScript,{DocumentFragment:u,HTMLTemplateElement:m,Node:k,Element:T,NodeFilter:w,NamedNodeMap:te=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:Ve,DOMParser:P,trustedTypes:ue}=e,oe=T.prototype,ct=me(oe,"cloneNode"),Fe=me(oe,"remove"),pt=me(oe,"nextSibling"),U=me(oe,"childNodes"),H=me(oe,"parentNode");if(typeof m=="function"){let o=i.createElement("template");o.content&&o.content.ownerDocument&&(i=o.content.ownerDocument)}let _,O="",{implementation:ve,createNodeIterator:ft,createDocumentFragment:mt,getElementsByTagName:gt}=i,{importNode:Wa}=a,N=wo();t.isSupported=typeof po=="function"&&typeof H=="function"&&ve&&ve.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Jt,ERB_EXPR:Xt,TMPLIT_EXPR:$t,DATA_ATTR:Za,ARIA_ATTR:Ka,IS_SCRIPT_OR_DATA:Ja,ATTR_WHITESPACE:Ti,CUSTOM_ELEMENT:Xa}=ko,{IS_ALLOWED_URI:xi}=ko,A=null,vi=c({},[...yo,...It,...Lt,...Dt,..._o]),I=null,ki=c({},[...ho,...Mt,...To,...je]),x=Object.seal(kt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ue=null,eo=null,ke=Object.seal(kt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),wi=!0,to=!0,Ai=!1,Ei=!0,we=!1,bt=!0,ce=!1,oo=!1,io=!1,Ae=!1,yt=!1,_t=!1,Si=!0,Ii=!1,$a="user-content-",ao=!0,He=!1,Ee={},Se=null,Li=c({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Di=null,Mi=c({},["audio","video","img","source","image","track"]),no=null,Ci=c({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ht="http://www.w3.org/1998/Math/MathML",Tt="http://www.w3.org/2000/svg",X="http://www.w3.org/1999/xhtml",Ie=X,ro=!1,lo=null,en=c({},[ht,Tt,X],Et),xt=c({},["mi","mo","mn","ms","mtext"]),vt=c({},["annotation-xml"]),tn=c({},["title","style","font","a","script"]),Ye=null,on=["application/xhtml+xml","text/html"],an="text/html",E=null,Le=null,nn=i.createElement("form"),Ri=f(function(o){return o instanceof RegExp||o instanceof Function},"isRegexOrFunction"),so=f(function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Le&&Le===o)){if((!o||typeof o!="object")&&(o={}),o=j(o),Ye=on.indexOf(o.PARSER_MEDIA_TYPE)===-1?an:o.PARSER_MEDIA_TYPE,E=Ye==="application/xhtml+xml"?Et:Qe,A=Y(o,"ALLOWED_TAGS")?c({},o.ALLOWED_TAGS,E):vi,I=Y(o,"ALLOWED_ATTR")?c({},o.ALLOWED_ATTR,E):ki,lo=Y(o,"ALLOWED_NAMESPACES")?c({},o.ALLOWED_NAMESPACES,Et):en,no=Y(o,"ADD_URI_SAFE_ATTR")?c(j(Ci),o.ADD_URI_SAFE_ATTR,E):Ci,Di=Y(o,"ADD_DATA_URI_TAGS")?c(j(Mi),o.ADD_DATA_URI_TAGS,E):Mi,Se=Y(o,"FORBID_CONTENTS")?c({},o.FORBID_CONTENTS,E):Li,Ue=Y(o,"FORBID_TAGS")?c({},o.FORBID_TAGS,E):j({}),eo=Y(o,"FORBID_ATTR")?c({},o.FORBID_ATTR,E):j({}),Ee=Y(o,"USE_PROFILES")?o.USE_PROFILES:!1,wi=o.ALLOW_ARIA_ATTR!==!1,to=o.ALLOW_DATA_ATTR!==!1,Ai=o.ALLOW_UNKNOWN_PROTOCOLS||!1,Ei=o.ALLOW_SELF_CLOSE_IN_ATTR!==!1,we=o.SAFE_FOR_TEMPLATES||!1,bt=o.SAFE_FOR_XML!==!1,ce=o.WHOLE_DOCUMENT||!1,Ae=o.RETURN_DOM||!1,yt=o.RETURN_DOM_FRAGMENT||!1,_t=o.RETURN_TRUSTED_TYPE||!1,io=o.FORCE_BODY||!1,Si=o.SANITIZE_DOM!==!1,Ii=o.SANITIZE_NAMED_PROPS||!1,ao=o.KEEP_CONTENT!==!1,He=o.IN_PLACE||!1,xi=o.ALLOWED_URI_REGEXP||xo,Ie=o.NAMESPACE||X,xt=o.MATHML_TEXT_INTEGRATION_POINTS||xt,vt=o.HTML_INTEGRATION_POINTS||vt,x=o.CUSTOM_ELEMENT_HANDLING||{},o.CUSTOM_ELEMENT_HANDLING&&Ri(o.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(x.tagNameCheck=o.CUSTOM_ELEMENT_HANDLING.tagNameCheck),o.CUSTOM_ELEMENT_HANDLING&&Ri(o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(x.attributeNameCheck=o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),o.CUSTOM_ELEMENT_HANDLING&&typeof o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(x.allowCustomizedBuiltInElements=o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),we&&(to=!1),yt&&(Ae=!0),Ee&&(A=c({},_o),I=[],Ee.html===!0&&(c(A,yo),c(I,ho)),Ee.svg===!0&&(c(A,It),c(I,Mt),c(I,je)),Ee.svgFilters===!0&&(c(A,Lt),c(I,Mt),c(I,je)),Ee.mathMl===!0&&(c(A,Dt),c(I,To),c(I,je))),o.ADD_TAGS&&(typeof o.ADD_TAGS=="function"?ke.tagCheck=o.ADD_TAGS:(A===vi&&(A=j(A)),c(A,o.ADD_TAGS,E))),o.ADD_ATTR&&(typeof o.ADD_ATTR=="function"?ke.attributeCheck=o.ADD_ATTR:(I===ki&&(I=j(I)),c(I,o.ADD_ATTR,E))),o.ADD_URI_SAFE_ATTR&&c(no,o.ADD_URI_SAFE_ATTR,E),o.FORBID_CONTENTS&&(Se===Li&&(Se=j(Se)),c(Se,o.FORBID_CONTENTS,E)),ao&&(A["#text"]=!0),ce&&c(A,["html","head","body"]),A.table&&(c(A,["tbody"]),delete Ue.tbody),o.TRUSTED_TYPES_POLICY){if(typeof o.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ce('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof o.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ce('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=o.TRUSTED_TYPES_POLICY,O=_.createHTML("")}else _===void 0&&(_=sa(ue,l)),_!==null&&typeof O=="string"&&(O=_.createHTML(""));C&&C(o),Le=o}},"_parseConfig"),Ni=c({},[...It,...Lt,...Xi]),Oi=c({},[...Dt,...$i]),rn=f(function(o){let r=H(o);(!r||!r.tagName)&&(r={namespaceURI:Ie,tagName:"template"});let n=Qe(o.tagName),b=Qe(r.tagName);return lo[o.namespaceURI]?o.namespaceURI===Tt?r.namespaceURI===X?n==="svg":r.namespaceURI===ht?n==="svg"&&(b==="annotation-xml"||xt[b]):!!Ni[n]:o.namespaceURI===ht?r.namespaceURI===X?n==="math":r.namespaceURI===Tt?n==="math"&&vt[b]:!!Oi[n]:o.namespaceURI===X?r.namespaceURI===Tt&&!vt[b]||r.namespaceURI===ht&&!xt[b]?!1:!Oi[n]&&(tn[n]||!Ni[n]):!!(Ye==="application/xhtml+xml"&&lo[o.namespaceURI]):!1},"_checkValidNamespace"),pe=f(function(o){De(t.removed,{element:o});try{H(o).removeChild(o)}catch{Fe(o)}},"_forceRemove"),fe=f(function(o,r){try{De(t.removed,{attribute:r.getAttributeNode(o),from:r})}catch{De(t.removed,{attribute:null,from:r})}if(r.removeAttribute(o),o==="is")if(Ae||yt)try{pe(r)}catch{}else try{r.setAttribute(o,"")}catch{}},"_removeAttribute"),Bi=f(function(o){let r=null,n=null;if(io)o=""+o;else{let h=St(o,/^[\r\n\t ]+/);n=h&&h[0]}Ye==="application/xhtml+xml"&&Ie===X&&(o=''+o+"");let b=_?_.createHTML(o):o;if(Ie===X)try{r=new P().parseFromString(b,Ye)}catch{}if(!r||!r.documentElement){r=ve.createDocument(Ie,"template",null);try{r.documentElement.innerHTML=ro?O:b}catch{}}let L=r.body||r.documentElement;return o&&n&&L.insertBefore(i.createTextNode(n),L.childNodes[0]||null),Ie===X?gt.call(r,ce?"html":"body")[0]:ce?r.documentElement:L},"_initDocument"),Pi=f(function(o){return ft.call(o.ownerDocument||o,o,w.SHOW_ELEMENT|w.SHOW_COMMENT|w.SHOW_TEXT|w.SHOW_PROCESSING_INSTRUCTION|w.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),uo=f(function(o){return o instanceof Ve&&(typeof o.nodeName!="string"||typeof o.textContent!="string"||typeof o.removeChild!="function"||!(o.attributes instanceof te)||typeof o.removeAttribute!="function"||typeof o.setAttribute!="function"||typeof o.namespaceURI!="string"||typeof o.insertBefore!="function"||typeof o.hasChildNodes!="function")},"_isClobbered"),zi=f(function(o){return typeof k=="function"&&o instanceof k},"_isNode");function K(o,r,n){Ge(o,b=>{b.call(t,r,n,Le)})}f(K,"_executeHooks");let Vi=f(function(o){let r=null;if(K(N.beforeSanitizeElements,o,null),uo(o))return pe(o),!0;let n=E(o.nodeName);if(K(N.uponSanitizeElement,o,{tagName:n,allowedTags:A}),bt&&o.hasChildNodes()&&!zi(o.firstElementChild)&&R(/<[/\w!]/g,o.innerHTML)&&R(/<[/\w!]/g,o.textContent)||o.nodeType===Re.progressingInstruction||bt&&o.nodeType===Re.comment&&R(/<[/\w]/g,o.data))return pe(o),!0;if(!(ke.tagCheck instanceof Function&&ke.tagCheck(n))&&(!A[n]||Ue[n])){if(!Ue[n]&&Ui(n)&&(x.tagNameCheck instanceof RegExp&&R(x.tagNameCheck,n)||x.tagNameCheck instanceof Function&&x.tagNameCheck(n)))return!1;if(ao&&!Se[n]){let b=H(o)||o.parentNode,L=U(o)||o.childNodes;if(L&&b){let h=L.length;for(let $=h-1;$>=0;--$){let G=ct(L[$],!0);G.__removalCount=(o.__removalCount||0)+1,b.insertBefore(G,pt(o))}}}return pe(o),!0}return o instanceof T&&!rn(o)||(n==="noscript"||n==="noembed"||n==="noframes")&&R(/<\/no(script|embed|frames)/i,o.innerHTML)?(pe(o),!0):(we&&o.nodeType===Re.text&&(r=o.textContent,Ge([Jt,Xt,$t],b=>{r=Me(r,b," ")}),o.textContent!==r&&(De(t.removed,{element:o.cloneNode()}),o.textContent=r)),K(N.afterSanitizeElements,o,null),!1)},"_sanitizeElements"),Fi=f(function(o,r,n){if(Si&&(r==="id"||r==="name")&&(n in i||n in nn))return!1;if(!(to&&!eo[r]&&R(Za,r))&&!(wi&&R(Ka,r))&&!(ke.attributeCheck instanceof Function&&ke.attributeCheck(r,o))){if(!I[r]||eo[r]){if(!(Ui(o)&&(x.tagNameCheck instanceof RegExp&&R(x.tagNameCheck,o)||x.tagNameCheck instanceof Function&&x.tagNameCheck(o))&&(x.attributeNameCheck instanceof RegExp&&R(x.attributeNameCheck,r)||x.attributeNameCheck instanceof Function&&x.attributeNameCheck(r,o))||r==="is"&&x.allowCustomizedBuiltInElements&&(x.tagNameCheck instanceof RegExp&&R(x.tagNameCheck,n)||x.tagNameCheck instanceof Function&&x.tagNameCheck(n))))return!1}else if(!no[r]&&!R(xi,Me(n,Ti,""))&&!((r==="src"||r==="xlink:href"||r==="href")&&o!=="script"&&Ki(n,"data:")===0&&Di[o])&&!(Ai&&!R(Ja,Me(n,Ti,"")))&&n)return!1}return!0},"_isValidAttribute"),Ui=f(function(o){return o!=="annotation-xml"&&St(o,Xa)},"_isBasicCustomElement"),Hi=f(function(o){K(N.beforeSanitizeAttributes,o,null);let{attributes:r}=o;if(!r||uo(o))return;let n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:I,forceKeepAttr:void 0},b=r.length;for(;b--;){let L=r[b],{name:h,namespaceURI:$,value:G}=L,Q=E(h),co=G,D=h==="value"?co:Ji(co);if(n.attrName=Q,n.attrValue=D,n.keepAttr=!0,n.forceKeepAttr=void 0,K(N.uponSanitizeAttribute,o,n),D=n.attrValue,Ii&&(Q==="id"||Q==="name")&&(fe(h,o),D=$a+D),bt&&R(/((--!?|])>)|<\/(style|title|textarea)/i,D)){fe(h,o);continue}if(Q==="attributename"&&St(D,"href")){fe(h,o);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){fe(h,o);continue}if(!Ei&&R(/\/>/i,D)){fe(h,o);continue}we&&Ge([Jt,Xt,$t],ln=>{D=Me(D,ln," ")});let Yi=E(o.nodeName);if(!Fi(Yi,Q,D)){fe(h,o);continue}if(_&&typeof ue=="object"&&typeof ue.getAttributeType=="function"&&!$)switch(ue.getAttributeType(Yi,Q)){case"TrustedHTML":{D=_.createHTML(D);break}case"TrustedScriptURL":{D=_.createScriptURL(D);break}}if(D!==co)try{$?o.setAttributeNS($,h,D):o.setAttribute(h,D),uo(o)?pe(o):mo(t.removed)}catch{fe(h,o)}}K(N.afterSanitizeAttributes,o,null)},"_sanitizeAttributes"),dn=f(function o(r){let n=null,b=Pi(r);for(K(N.beforeSanitizeShadowDOM,r,null);n=b.nextNode();)K(N.uponSanitizeShadowNode,n,null),Vi(n),Hi(n),n.content instanceof u&&o(n.content);K(N.afterSanitizeShadowDOM,r,null)},"_sanitizeShadowDOM");return t.sanitize=function(o){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=null,b=null,L=null,h=null;if(ro=!o,ro&&(o=""),typeof o!="string"&&!zi(o))if(typeof o.toString=="function"){if(o=o.toString(),typeof o!="string")throw Ce("dirty is not a string, aborting")}else throw Ce("toString is not a function");if(!t.isSupported)return o;if(oo||so(r),t.removed=[],typeof o=="string"&&(He=!1),He){if(o.nodeName){let Q=E(o.nodeName);if(!A[Q]||Ue[Q])throw Ce("root node is forbidden and cannot be sanitized in-place")}}else if(o instanceof k)n=Bi(""),b=n.ownerDocument.importNode(o,!0),b.nodeType===Re.element&&b.nodeName==="BODY"||b.nodeName==="HTML"?n=b:n.appendChild(b);else{if(!Ae&&!we&&!ce&&o.indexOf("<")===-1)return _&&_t?_.createHTML(o):o;if(n=Bi(o),!n)return Ae?null:_t?O:""}n&&io&&pe(n.firstChild);let $=Pi(He?o:n);for(;L=$.nextNode();)Vi(L),Hi(L),L.content instanceof u&&dn(L.content);if(He)return o;if(Ae){if(yt)for(h=mt.call(n.ownerDocument);n.firstChild;)h.appendChild(n.firstChild);else h=n;return(I.shadowroot||I.shadowrootmode)&&(h=Wa.call(a,h,!0)),h}let G=ce?n.outerHTML:n.innerHTML;return ce&&A["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&R(vo,n.ownerDocument.doctype.name)&&(G=""+G),we&&Ge([Jt,Xt,$t],Q=>{G=Me(G,Q," ")}),_&&_t?_.createHTML(G):G},t.setConfig=function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};so(o),oo=!0},t.clearConfig=function(){Le=null,oo=!1},t.isValidAttribute=function(o,r,n){Le||so({});let b=E(o),L=E(r);return Fi(b,L,n)},t.addHook=function(o,r){typeof r=="function"&&De(N[o],r)},t.removeHook=function(o,r){if(r!==void 0){let n=Wi(N[o],r);return n===-1?void 0:Zi(N[o],n,1)[0]}return mo(N[o])},t.removeHooks=function(o){N[o]=[]},t.removeAllHooks=function(){N=wo()},t}f(Ct,"createDOMPurify");var Ao=Ct();let Ne=!1;window.trustedTypes&&window.trustedTypes.createPolicy&&Ao&&(Ne=window.trustedTypes.createPolicy("GoodTubePolicy",{createHTML:e=>Ao.sanitize(e,{RETURN_TRUSTED_TYPE:!1})}));function Eo(){let e={};if(document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g,function(){function t(i){return decodeURIComponent(i.split("+").join(" "))}e[t(arguments[1])]=t(arguments[2])}),F()&&typeof e.v>"u"){let t="";window.location.href.indexOf("/watch/")!==-1?t="/watch/":t="/live/";let i=window.location.href.split(t);if(i.length===2){let a=i[1].split("?");e.v=a[a.length-1]}}return e}function p(e,t,i=399){e=e+"_new",document.cookie=e+"="+encodeURIComponent(t)+";SameSite=Lax;path=/;max-age="+i*24*60*60}function V(e){e=e+"_new";let t=document.cookie.split(";");for(let i=0;i .pivot-shorts),
ytd-rich-section-renderer,
grid-shelf-view-model {
display: none !important;
}
- `,console.log("[GoodTube] Shorts removed")),ze==="true"&&(e+=`
+ `,console.log("[GoodTube] Shorts removed")),Ke==="true"&&(e+=`
/* Hide suggested videos */
ytd-watch-flexy #secondary #related {
display: none !important;
@@ -97,21 +96,21 @@
ytd-watch-flexy #secondary:not(:has(ytd-playlist-panel-video-renderer)) {
display: none !important;
}
- `,console.log("[GoodTube] Suggested videos removed")),He==="true"&&(e+=`
+ `,console.log("[GoodTube] Suggested videos removed")),Je==="true"&&(e+=`
ytd-item-section-renderer.ytd-comments,
#comments-button,
#shorts-panel-container ytd-engagement-panel-section-list-renderer {
display: none !important;
}
- `,console.log("[GoodTube] Comments removed")),Ye==="true"&&(e+=`
+ `,console.log("[GoodTube] Comments removed")),Xe==="true"&&(e+=`
ytd-expandable-metadata-renderer[has-video-summary] {
display: none !important;
}
- `,console.log("[GoodTube] AI summaries removed"));let o=document.createElement("style");o.textContent=e,document.head.appendChild(o)}function Et(){if(te==="true")return;window.location.href.indexOf("/shorts")!==-1&&!C&&(window.location.href="https://youtube.com",C=!0),document.querySelectorAll("a:not(.goodTube_hidden)").forEach(i=>{i.href.indexOf("shorts/")!==-1&&(F(i),F(i.closest("ytd-video-renderer")),F(i.closest("ytd-compact-video-renderer")),F(i.closest("ytd-rich-grid-media")))}),document.querySelectorAll("yt-chip-cloud-chip-renderer:not(.goodTube_hidden):not(.goodTube_checked), yt-tab-shape:not(.goodTube_hidden):not(.goodTube_checked), ytd-guide-entry-renderer:not(.goodTube_checked)").forEach(i=>{i.innerHTML.toLowerCase().indexOf("shorts")!==-1&&F(i),i.classList.add("goodTube_checked")})}function I(){document.querySelectorAll("#description a, ytd-comments .yt-core-attributed-string a, ytm-expandable-video-description-body-renderer a, .comment-content a").forEach(o=>{!o.classList.contains("goodTube_timestampLink")&&o.getAttribute("href")&&o.getAttribute("href").indexOf(S.v)!==-1&&(o.classList.add("goodTube_timestampLink"),o.addEventListener("click",function(){let i=0,d=o.getAttribute("href").split("t=");typeof d[1]<"u"&&(i=parseFloat(d[1].replace("s",""))),St(i)}))})}let oe=setTimeout(()=>{},0);function Se(){if(te==="true"&&window.location.href.indexOf("/shorts")!==-1||!V()){clearTimeout(oe),oe=setTimeout(Se,100);return}document.querySelectorAll("video").forEach(o=>{v?!o.paused&&!o.closest("#movie_player")&&(o.muted=!0,o.volume=0,o.pause()):!o.paused&&(!at||!o.closest("#movie_player"))&&(o.muted=!0,o.volume=0,!re()||!o.closest("#movie_player")?(o.pause(),o.playbackRate=E):(o.play(),o.playbackRate=2))}),clearTimeout(oe),oe=setTimeout(Se,100)}function he(){if(ke)return;let e=document.querySelector("#movie_player .ytp-autonav-toggle-button");e&&(e.getAttribute("aria-checked")==="true"&&b(e),ke=!0)}function wt(){document.querySelectorAll("yt-confirm-dialog-renderer").forEach(o=>{if(o.innerHTML.indexOf("Video paused. Continue watching?")!==-1){let i=o.querySelector("#confirm-button");i&&b(i)}})}function lt(e,o){if(!e||!o)return;let i=document.querySelector("ytd-watch-flexy");i&&V()&&!v&&(i.style.setProperty("--ytd-watch-flexy-width-ratio",e),i.style.setProperty("--ytd-watch-flexy-height-ratio",o))}function kt(){let e=document.querySelector("ytd-watch-flexy");e&&(e.style.removeProperty("--ytd-watch-flexy-width-ratio"),e.style.removeProperty("--ytd-watch-flexy-height-ratio"))}let st=setTimeout(()=>{},0);function ce(){r=document.getElementById("movie_player");let e=!1;if(r&&typeof r.getVideoData=="function"&&(e=r.getVideoData()),!e){clearTimeout(st),st=setTimeout(ce,100);return}let o="transparent";Ge==="true"&&(o="#000000");let i=document.createElement("style");i.textContent=`
+ `,console.log("[GoodTube] AI summaries removed"));let t=document.createElement("style");t.textContent=e,document.head.appendChild(t)}function fa(){if(ge==="true")return;window.location.href.indexOf("/shorts")!==-1&&!Lo&&(window.location.href="https://youtube.com",Lo=!0),document.querySelectorAll("a:not(.goodTube_hidden)").forEach(i=>{i.href.indexOf("shorts/")!==-1&&(J(i),J(i.closest("ytd-video-renderer")),J(i.closest("ytd-compact-video-renderer")),J(i.closest("ytd-rich-grid-media")))}),document.querySelectorAll("yt-chip-cloud-chip-renderer:not(.goodTube_hidden):not(.goodTube_checked), yt-tab-shape:not(.goodTube_hidden):not(.goodTube_checked), ytd-guide-entry-renderer:not(.goodTube_checked)").forEach(i=>{i.innerHTML.toLowerCase().indexOf("shorts")!==-1&&J(i),i.classList.add("goodTube_checked")})}function ma(){document.querySelectorAll("#description a, ytd-comments .yt-core-attributed-string a, ytm-expandable-video-description-body-renderer a, .comment-content a").forEach(t=>{!t.classList.contains("goodTube_timestampLink")&&t.getAttribute("href")&&t.getAttribute("href").indexOf(v.v)!==-1&&(t.classList.add("goodTube_timestampLink"),t.addEventListener("click",function(){let i=0,a=t.getAttribute("href").split("t=");typeof a[1]<"u"&&(i=parseFloat(a[1].replace("s",""))),Po(i)}))})}let et=setTimeout(()=>{},0);function Pt(){if(ge==="true"&&window.location.href.indexOf("/shorts")!==-1||!F()){clearTimeout(et),et=setTimeout(Pt,100);return}document.querySelectorAll("video").forEach(t=>{y?!t.paused&&!t.closest("#movie_player")&&(t.muted=!0,t.volume=0,t.pause()):!t.paused&&(!Nt||!t.closest("#movie_player"))&&(t.muted=!0,t.volume=0,!Rt()||!t.closest("#movie_player")?(t.pause(),t.playbackRate=be):(t.play(),t.playbackRate=2))}),clearTimeout(et),et=setTimeout(Pt,100)}function ga(){if(Io)return;let e=document.querySelector("#movie_player .ytp-autonav-toggle-button");e&&(e.getAttribute("aria-checked")==="true"&&q(e),Io=!0)}function ba(){document.querySelectorAll("yt-confirm-dialog-renderer").forEach(t=>{if(t.innerHTML.indexOf("Video paused. Continue watching?")!==-1){let i=t.querySelector("#confirm-button");i&&q(i)}})}function ya(e,t){if(!e||!t)return;let i=document.querySelector("ytd-watch-flexy");i&&F()&&!y&&(i.style.setProperty("--ytd-watch-flexy-width-ratio",e),i.style.setProperty("--ytd-watch-flexy-height-ratio",t))}function _a(){let e=document.querySelector("ytd-watch-flexy");e&&(e.style.removeProperty("--ytd-watch-flexy-width-ratio"),e.style.removeProperty("--ytd-watch-flexy-height-ratio"))}let Co=setTimeout(()=>{},0);function Ro(){d=document.getElementById("movie_player");let e=!1;if(d&&typeof d.getVideoData=="function"&&(e=d.getVideoData()),!e){clearTimeout(Co),Co=setTimeout(Ro,100);return}let t="transparent";$e==="true"&&(t="#000000");let i=document.createElement("style");i.textContent=`
/* Player wrapper */
#goodTube_playerWrapper {
border-radius: 12px;
- background: `+o+`;
+ background: `+t+`;
position: absolute;
top: 0;
left: 0;
@@ -135,7 +134,7 @@
max-width: calc(177.77777778vh - var(--ytd-watch-flexy-masthead-height) * 1.7777777778 - var(--ytd-margin-6x) * 1.7777777778 - var(--ytd-watch-flexy-space-below-player) * 1.7777777778) !important;
min-width: calc(var(--ytd-watch-flexy-min-player-height) * 1.7777777778) !important;
}
- `,document.head.appendChild(i);let d=document.createElement("div");d.id="goodTube_playerWrapper",d.classList.add("goodTube_hidden"),document.body.appendChild(d);let m=document.createElement("iframe");m.src="https://en.wikipedia.org/wiki/Fuck?goodTubeProxy=1",m.setAttribute("width","100%"),m.setAttribute("height","100%"),m.setAttribute("frameborder","0"),m.setAttribute("scrolling","yes"),m.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"),m.setAttribute("referrerpolicy","strict-origin-when-cross-origin"),m.setAttribute("allowfullscreen",!0),m.style.display="none",d.appendChild(m),le=d,R=m,Ce(),setInterval(Ce,100)}let xe=!1;function fe(){if(v)xe||(De(!0),xe=!0);else{xe=!1;let e=document.querySelector("#player.ytd-watch-flexy");if((!e||e.offsetHeight<=0)&&(e=document.querySelector("#ytd-player")),(!e||e.offsetHeight<=0)&&(e=document.querySelector(".player-size")),(!e||e.offsetHeight<=0)&&(e=document.querySelector(".html5-video-player")),e&&e.offsetHeight>0){let o=e.getBoundingClientRect();le.style.top=o.top+window.scrollY+"px",le.style.left=o.left+window.scrollX+"px",le.style.width=e.offsetWidth+"px",le.style.height=e.offsetHeight+"px",ye(le)}}}let We=setTimeout(()=>{},0);function Ie(){r=document.getElementById("movie_player"),typeof r.getPlaylist=="function"&&typeof r.getPlaylistIndex=="function"&&(se=r.getPlaylist(),Ve=r.getPlaylistIndex(),se||(clearTimeout(We),We=setTimeout(Ie,100)))}let pe=setTimeout(()=>{},0);function Le(){if(A="",dt(),!Ue){clearTimeout(pe),pe=setTimeout(Le,100);return}let e=0;Te==="false"&&typeof S.t<"u"&&(e=parseFloat(S.t.replace("s","")));let o="false";if(typeof S.i<"u"||typeof S.index<"u"||typeof S.list<"u"?(o="true",Ie()):(se=!1,Ve=0),_e){V()||De();let i="";e>0&&(i="&start="+e),R.contentWindow.postMessage("goodTube_src_https://www.youtube.com/embed/"+S.v+"?goodTubeEmbed=1&autoplay=1&goodTube_playlist="+o+"&goodTube_autoplay="+j+"&goodTube_playbackSpeed="+E+"&goodTube_hideInfoCards="+de+"&goodTube_hideEndScreen="+ue+i,"*"),_e=!1}else R.contentWindow.postMessage("goodTube_load_"+S.v+"|||"+e+"|||"+o,"*");Te==="false"&&Qe(),J()}let me=setTimeout(()=>{},0);function Qe(){if(!rt){clearTimeout(me),me=setTimeout(Qe,100);return}r=document.getElementById("movie_player");let e=!1,o=!1;if(r&&typeof r.getVideoData=="function"&&typeof r.getCurrentTime=="function"&&(e=r.getVideoData(),o=e.video_id),!e||!o||o!==S.v){clearTimeout(me),me=setTimeout(Qe,100);return}let i=Math.floor(r.getCurrentTime());i>=10&&St(i,o)}function De(e=!1){we||(e?(r=document.getElementById("movie_player"),r&&typeof r.stopVideo=="function"&&r.stopVideo()):R.contentWindow.postMessage("goodTube_stopVideo","*")),F(le)}function St(e,o=""){R.contentWindow.postMessage("goodTube_skipTo_"+e+"|||"+o,"*")}function dt(){R.contentWindow.postMessage("goodTube_pause","*")}let ie=setTimeout(()=>{},0);function J(){if(!D||!rt){clearTimeout(ie),ie=setTimeout(J,100);return}if(!v)R.contentWindow.postMessage("goodTube_play|||"+S.v,"*");else{r=document.getElementById("movie_player");let e=!1;if(r&&typeof r.getVideoData=="function"&&(e=r.getVideoData()),!e||S.v!==e.video_id){clearTimeout(ie),ie=setTimeout(J,100);return}let o=document.querySelector("#movie_player video");if(o&&o.currentTime>=o.duration)return;r&&typeof r.playVideo=="function"&&setTimeout(()=>{r.playVideo()},100)}}function ve(){document.addEventListener("keydown",ut,!0),document.addEventListener("keyup",ut,!0)}function ut(e){if(!V()||v)return;let o=[{key:">",code:!1,ctrl:!1,shift:!0,alt:!1},{key:"<",code:!1,ctrl:!1,shift:!0,alt:!1},{key:",",code:!1,ctrl:!1,shift:!1,alt:!1},{key:".",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"arrowleft",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"arrowright",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"j",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"l",code:!1,ctrl:!1,shift:!1,alt:!1},{key:" ",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"k",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"m",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"f",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"c",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"o",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"w",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"=",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"-",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"w",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"a",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"s",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"d",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"[",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"]",code:!1,ctrl:!1,shift:!1,alt:!1},{key:!1,code:"numpadadd",ctrl:!1,shift:!1,alt:!1},{key:!1,code:"numpadsubtract",ctrl:!1,shift:!1,alt:!1},{key:"0",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"1",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"2",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"3",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"4",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"5",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"6",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"7",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"8",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"9",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"i",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"arrowleft",code:!1,ctrl:!0,shift:!1,alt:!1},{key:"arrowright",code:!1,ctrl:!0,shift:!1,alt:!1}],i=e.key.toLowerCase(),d=e.code.toLowerCase(),m=e.ctrlKey;e.metaKey&&(m=e.metaKey);let h=e.shiftKey,T=e.altKey,U=!1;if(o.forEach(N=>{(i===N.key||d===N.code)&&m===N.ctrl&&h===N.shift&&T===N.alt&&(U=!0)}),U){let N=e.srcElement,Q=!1,nt=!1;N&&(typeof N.nodeName<"u"&&(Q=N.nodeName.toLowerCase()),typeof N.getAttribute<"u"&&(nt=N.getAttribute("id"))),(!N||Q.indexOf("input")===-1&&Q.indexOf("label")===-1&&Q.indexOf("select")===-1&&Q.indexOf("textarea")===-1&&Q.indexOf("fieldset")===-1&&Q.indexOf("legend")===-1&&Q.indexOf("datalist")===-1&&Q.indexOf("output")===-1&&Q.indexOf("option")===-1&&Q.indexOf("optgroup")===-1&&nt!=="contenteditable-root")&&(e.preventDefault(),e.stopImmediatePropagation(),R.contentWindow.postMessage("goodTube_shortcut_"+e.type+"_"+e.key+"_"+e.keyCode+"_"+e.ctrlKey+"_"+e.metaKey+"_"+e.shiftKey+"_"+e.altKey,"*"))}}function ct(e=!1){r=document.getElementById("movie_player"),r&&typeof r.nextVideo=="function"&&r.nextVideo(),console.log("[GoodTube] Playing next video...")}function It(){r=document.getElementById("movie_player"),r&&typeof r.previousVideo=="function"&&r.previousVideo(),console.log("[GoodTube] Playing previous video...")}function ft(){Ie(),(j==="true"||se&&Ve{},0);function Ze(e=!1){e||(window.top===window.self&&(console.log(`
+ `,document.head.appendChild(i);let a=document.createElement("div");a.id="goodTube_playerWrapper",a.classList.add("goodTube_hidden"),document.body.appendChild(a);let l=document.createElement("iframe");l.src="https://en.wikipedia.org/wiki/Fuck?goodTubeProxy=1",l.setAttribute("width","100%"),l.setAttribute("height","100%"),l.setAttribute("frameborder","0"),l.setAttribute("scrolling","yes"),l.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"),l.setAttribute("referrerpolicy","strict-origin-when-cross-origin"),l.setAttribute("allowfullscreen",!0),l.style.display="none",a.appendChild(l),ie=a,B=l,Go(),setInterval(Go,100)}let zt=!1;function ha(){if(y)zt||(ot(!0),zt=!0);else{zt=!1;let e=document.querySelector("#player.ytd-watch-flexy");if((!e||e.offsetHeight<=0)&&(e=document.querySelector("#ytd-player")),(!e||e.offsetHeight<=0)&&(e=document.querySelector(".player-size")),(!e||e.offsetHeight<=0)&&(e=document.querySelector(".html5-video-player")),e&&e.offsetHeight>0){let t=e.getBoundingClientRect();ie.style.top=t.top+window.scrollY+"px",ie.style.left=t.left+window.scrollX+"px",ie.style.width=e.offsetWidth+"px",ie.style.height=e.offsetHeight+"px",qe(ie)}}}let No=setTimeout(()=>{},0);function Vt(){d=document.getElementById("movie_player"),typeof d.getPlaylist=="function"&&typeof d.getPlaylistIndex=="function"&&(ae=d.getPlaylist(),Ze=d.getPlaylistIndex(),ae||(clearTimeout(No),No=setTimeout(Vt,100)))}let Oo=setTimeout(()=>{},0);function Bo(){if(ne="",Ta(),!Mo){clearTimeout(Oo),Oo=setTimeout(Bo,100);return}let e=0;ze==="false"&&typeof v.t<"u"&&(e=parseFloat(v.t.replace("s","")));let t="false";if(typeof v.i<"u"||typeof v.index<"u"||typeof v.list<"u"?(t="true",Vt()):(ae=!1,Ze=0),Do){F()||ot();let i="";e>0&&(i="&start="+e),B.contentWindow.postMessage("goodTube_src_https://www.youtube.com/embed/"+v.v+"?goodTubeEmbed=1&autoplay=1&goodTube_playlist="+t+"&goodTube_autoplay="+W+"&goodTube_playbackSpeed="+be+"&goodTube_hideInfoCards="+Be+"&goodTube_hideEndScreen="+Pe+i,"*"),Do=!1}else B.contentWindow.postMessage("goodTube_load_"+v.v+"|||"+e+"|||"+t,"*");ze==="false"&&Ft(),at()}let tt=setTimeout(()=>{},0);function Ft(){if(!Ot){clearTimeout(tt),tt=setTimeout(Ft,100);return}d=document.getElementById("movie_player");let e=!1,t=!1;if(d&&typeof d.getVideoData=="function"&&typeof d.getCurrentTime=="function"&&(e=d.getVideoData(),t=e.video_id),!e||!t||t!==v.v){clearTimeout(tt),tt=setTimeout(Ft,100);return}let i=Math.floor(d.getCurrentTime());i>=10&&Po(i,t)}function ot(e=!1){Oe||(e?(d=document.getElementById("movie_player"),d&&typeof d.stopVideo=="function"&&d.stopVideo()):B.contentWindow.postMessage("goodTube_stopVideo","*")),J(ie)}function Po(e,t=""){B.contentWindow.postMessage("goodTube_skipTo_"+e+"|||"+t,"*")}function Ta(){B.contentWindow.postMessage("goodTube_pause","*")}let it=setTimeout(()=>{},0);function at(){if(!Bt||!Ot){clearTimeout(it),it=setTimeout(at,100);return}if(!y)B.contentWindow.postMessage("goodTube_play|||"+v.v,"*");else{d=document.getElementById("movie_player");let e=!1;if(d&&typeof d.getVideoData=="function"&&(e=d.getVideoData()),!e||v.v!==e.video_id){clearTimeout(it),it=setTimeout(at,100);return}let t=document.querySelector("#movie_player video");if(t&&t.currentTime>=t.duration)return;d&&typeof d.playVideo=="function"&&setTimeout(()=>{d.playVideo()},100)}}function xa(){document.addEventListener("keydown",zo,!0),document.addEventListener("keyup",zo,!0)}function zo(e){if(!F()||y)return;let t=[{key:">",code:!1,ctrl:!1,shift:!0,alt:!1},{key:"<",code:!1,ctrl:!1,shift:!0,alt:!1},{key:",",code:!1,ctrl:!1,shift:!1,alt:!1},{key:".",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"arrowleft",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"arrowright",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"j",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"l",code:!1,ctrl:!1,shift:!1,alt:!1},{key:" ",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"k",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"m",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"f",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"c",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"o",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"w",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"=",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"-",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"w",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"a",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"s",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"d",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"[",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"]",code:!1,ctrl:!1,shift:!1,alt:!1},{key:!1,code:"numpadadd",ctrl:!1,shift:!1,alt:!1},{key:!1,code:"numpadsubtract",ctrl:!1,shift:!1,alt:!1},{key:"0",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"1",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"2",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"3",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"4",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"5",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"6",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"7",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"8",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"9",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"i",code:!1,ctrl:!1,shift:!1,alt:!1},{key:"arrowleft",code:!1,ctrl:!0,shift:!1,alt:!1},{key:"arrowright",code:!1,ctrl:!0,shift:!1,alt:!1}],i=e.key.toLowerCase(),a=e.code.toLowerCase(),l=e.ctrlKey;e.metaKey&&(l=e.metaKey);let u=e.shiftKey,m=e.altKey,k=!1;if(t.forEach(T=>{(i===T.key||a===T.code)&&l===T.ctrl&&u===T.shift&&m===T.alt&&(k=!0)}),k){let T=e.srcElement,w=!1,te=!1;T&&(typeof T.nodeName<"u"&&(w=T.nodeName.toLowerCase()),typeof T.getAttribute<"u"&&(te=T.getAttribute("id"))),(!T||w.indexOf("input")===-1&&w.indexOf("label")===-1&&w.indexOf("select")===-1&&w.indexOf("textarea")===-1&&w.indexOf("fieldset")===-1&&w.indexOf("legend")===-1&&w.indexOf("datalist")===-1&&w.indexOf("output")===-1&&w.indexOf("option")===-1&&w.indexOf("optgroup")===-1&&te!=="contenteditable-root")&&(e.preventDefault(),e.stopImmediatePropagation(),B.contentWindow.postMessage("goodTube_shortcut_"+e.type+"_"+e.key+"_"+e.keyCode+"_"+e.ctrlKey+"_"+e.metaKey+"_"+e.shiftKey+"_"+e.altKey,"*"))}}function Vo(e=!1){d=document.getElementById("movie_player"),d&&typeof d.nextVideo=="function"&&d.nextVideo(),console.log("[GoodTube] Playing next video...")}function va(){d=document.getElementById("movie_player"),d&&typeof d.previousVideo=="function"&&d.previousVideo(),console.log("[GoodTube] Playing previous video...")}function ka(){Vt(),(W==="true"||ae&&Ze{},0);function Ho(e=!1){e||(window.top===window.self&&(console.log(`
==================================================
______ ________ __
/ ____/___ ____ ____/ /_ __/_ __/ /_ ___
@@ -143,7 +142,7 @@
/ /_/ / /_/ / /_/ / /_/ / / / / /_/ / /_/ / __/
\\____/\\____/\\____/\\____/ /_/ \\____/_____/\\___/
-==================================================`),console.log("[GoodTube] Initiating...")),window.addEventListener("message",Re),Se(),document.addEventListener("DOMContentLoaded",Me),(document.readyState==="interactive"||document.readyState==="complete")&&Me()),!document.body||!document.head?(clearTimeout(ge),ge=setTimeout(()=>{Ze(!0)},1)):Me()}function Me(){q||(q=!0,Oe(),B(),M(),ce(),Wt(),je(),ve(),Gt())}let Ke=setTimeout(()=>{},0);function Re(e){if(typeof e.data=="string"){if(!document.body||!document.head?(clearTimeout(Ke),Ke=setTimeout(()=>{Re(e)},100)):e.data==="goodTube_proxyIframe_loaded"?Ue=!0:e.data==="goodTube_playerIframe_loaded"&&(rt=!0,R.style.display="block"),e.data.indexOf("goodTube_pip_")!==-1)e.data.replace("goodTube_pip_","")==="true"?we=!0:(we=!1,typeof S.v>"u"&&De());else if(e.data.indexOf("goodTube_playbackSpeed_")!==-1)a("goodTube_playbackSpeed",e.data.replace("goodTube_playbackSpeed_","")),E=e.data.replace("goodTube_playbackSpeed_","");else if(e.data==="goodTube_prevVideo")It();else if(e.data==="goodTube_nextVideo")ct();else if(e.data==="goodTube_videoEnded")ft();else if(e.data==="goodTube_theater"&&!document.fullscreenElement){let o=document.querySelector(".ytp-size-button");o&&b(o)}else if(e.data==="goodTube_autoplay_false")a("goodTube_autoplay","false"),j="false";else if(e.data==="goodTube_autoplay_true")a("goodTube_autoplay","true"),j="true";else if(e.data.indexOf("goodTube_syncMainPlayer_")!==-1&&V()&&!v){let o=parseFloat(e.data.replace("goodTube_syncMainPlayer_","")),i=document.querySelector("#movie_player video");if(r=document.getElementById("movie_player"),!r||typeof r.seekTo!="function"||typeof r.playVideo!="function"||typeof r.mute!="function"||typeof r.setVolume!="function")return;i&&Math.floor(i.currentTime)!==Math.floor(o)&&!re()&&(at=!0,r.playVideo(),r.seekTo(o-.5),r.mute(),r.setVolume(0),i.volume=0,i.muted=!0,clearTimeout(Ke),Ke=setTimeout(()=>{at=!1},1e3))}else if(e.data==="goodTube_fallback_enable")v=!0,document.body&&!document.body.classList.contains("goodTube_fallback")&&document.body.classList.add("goodTube_fallback"),kt(),gt(),J(),document.fullscreenElement&&(document.exitFullscreen(),window.setTimeout(()=>{let o=document.querySelector(".ytp-fullscreen-button");o&&b(o)},100));else if(e.data==="goodTube_fallback_disable")v=!1,document.body&&document.body.classList.contains("goodTube_fallback")&&document.body.classList.remove("goodTube_fallback"),document.fullscreenElement&&(document.exitFullscreen(),window.setTimeout(()=>{R.contentWindow.postMessage("goodTube_fullscreen","*")},100));else if(e.data.indexOf("goodTube_syncAspectRatio_")!==-1){let o=e.data.replace("goodTube_syncAspectRatio_","").split("_");lt(o[0],o[1])}}}function Ce(){let e=At;e&&(e=e.split("#")[0],e=e.split("index=")[0]);let o=window.location.href;o&&(o=o.split("#")[0],o=o.split("index=")[0]),e!==o&&(S=s(),V()?(Le(),qe()):De(),At=window.location.href),V()&&(Lt(),I(),v||he(),wt(),fe(),Qt()),Et()}function Gt(){let e=document.createElement("div");document.body.appendChild(e);let o=" checked";te==="true"&&(o="");let i="";de==="true"&&(i=" checked");let d="";ue==="true"&&(d=" checked");let m="";ze==="true"&&(m=" checked");let h="";He==="true"&&(h=" checked");let T="";Ye==="true"&&(T=" checked");let U="";Te==="true"&&(U=" checked");let N="";Ge==="true"&&(N=" checked"),Fe(e,`
+==================================================`),console.log("[GoodTube] Initiating...")),window.addEventListener("message",Yo),Pt(),document.addEventListener("DOMContentLoaded",Ut),(document.readyState==="interactive"||document.readyState==="complete")&&Ut()),!document.body||!document.head?(clearTimeout(Uo),Uo=setTimeout(()=>{Ho(!0)},1)):Ut()}function Ut(){Fo||(Fo=!0,Ia(),ua(),pa(),Ro(),La(),Aa(),xa(),Sa())}let nt=setTimeout(()=>{},0);function Yo(e){if(typeof e.data=="string"){if(!document.body||!document.head?(clearTimeout(nt),nt=setTimeout(()=>{Yo(e)},100)):e.data==="goodTube_proxyIframe_loaded"?Mo=!0:e.data==="goodTube_playerIframe_loaded"&&(Ot=!0,B.style.display="block"),e.data.indexOf("goodTube_pip_")!==-1)e.data.replace("goodTube_pip_","")==="true"?Oe=!0:(Oe=!1,typeof v.v>"u"&&ot());else if(e.data.indexOf("goodTube_playbackSpeed_")!==-1)p("goodTube_playbackSpeed",e.data.replace("goodTube_playbackSpeed_","")),be=e.data.replace("goodTube_playbackSpeed_","");else if(e.data==="goodTube_prevVideo")va();else if(e.data==="goodTube_nextVideo")Vo();else if(e.data==="goodTube_videoEnded")ka();else if(e.data==="goodTube_theater"&&!document.fullscreenElement){let t=document.querySelector(".ytp-size-button");t&&q(t)}else if(e.data==="goodTube_autoplay_false")p("goodTube_autoplay","false"),W="false";else if(e.data==="goodTube_autoplay_true")p("goodTube_autoplay","true"),W="true";else if(e.data.indexOf("goodTube_syncMainPlayer_")!==-1&&F()&&!y){let t=parseFloat(e.data.replace("goodTube_syncMainPlayer_","")),i=document.querySelector("#movie_player video");if(d=document.getElementById("movie_player"),!d||typeof d.seekTo!="function"||typeof d.playVideo!="function"||typeof d.mute!="function"||typeof d.setVolume!="function")return;i&&Math.floor(i.currentTime)!==Math.floor(t)&&!Rt()&&(Nt=!0,d.playVideo(),d.seekTo(t-.5),d.mute(),d.setVolume(0),i.volume=0,i.muted=!0,clearTimeout(nt),nt=setTimeout(()=>{Nt=!1},1e3))}else if(e.data==="goodTube_fallback_enable")y=!0,document.body&&!document.body.classList.contains("goodTube_fallback")&&document.body.classList.add("goodTube_fallback"),_a(),Wo(),at(),document.fullscreenElement&&(document.exitFullscreen(),window.setTimeout(()=>{let t=document.querySelector(".ytp-fullscreen-button");t&&q(t)},100));else if(e.data==="goodTube_fallback_disable")y=!1,document.body&&document.body.classList.contains("goodTube_fallback")&&document.body.classList.remove("goodTube_fallback"),document.fullscreenElement&&(document.exitFullscreen(),window.setTimeout(()=>{B.contentWindow.postMessage("goodTube_fullscreen","*")},100));else if(e.data.indexOf("goodTube_syncAspectRatio_")!==-1){let t=e.data.replace("goodTube_syncAspectRatio_","").split("_");ya(t[0],t[1])}}}function Go(){let e=So;e&&(e=e.split("#")[0],e=e.split("index=")[0]);let t=window.location.href;t&&(t=t.split("#")[0],t=t.split("index=")[0]),e!==t&&(v=Eo(),F()?(Bo(),Ea()):ot(),So=window.location.href),F()&&(wa(),ma(),y||ga(),ba(),ha(),Da()),fa()}function Sa(){let e=document.createElement("div");document.body.appendChild(e);let t=" checked";ge==="true"&&(t="");let i="";Be==="true"&&(i=" checked");let a="";Pe==="true"&&(a=" checked");let l="";Ke==="true"&&(l=" checked");let u="";Je==="true"&&(u=" checked");let m="";Xe==="true"&&(m=" checked");let k="";ze==="true"&&(k=" checked");let T="";$e==="true"&&(T=" checked"),We(e,`