1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
| (() => { var t = { 576: (t, r, e) => { var a, n; void 0 === (n = "function" == typeof(a = function() { var t = { a: "href", img: "src", form: "action", base: "href", script: "src", iframe: "src", link: "href", embed: "src", object: "data" }, r = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "fragment"], e = { anchor: "fragment" }, a = { strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))[email protected])?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))[email protected])?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ }, n = /^[0-9]+$/;
function o(t, e) { for (var n = decodeURI(t), o = a[e ? "strict" : "loose"].exec(n), i = { attr: {}, param: {}, seg: {} }, s = 14; s--;) i.attr[r[s]] = o[s] || ""; return i.param.query = f(i.attr.query), i.param.fragment = f(i.attr.fragment), i.seg.path = i.attr.path.replace(/^\/+|\/+$/g, "").split("/"), i.seg.fragment = i.attr.fragment.replace(/^\/+|\/+$/g, "").split("/"), i.attr.base = i.attr.host ? (i.attr.protocol ? i.attr.protocol + "://" + i.attr.host : i.attr.host) + (i.attr.port ? ":" + i.attr.port : "") : "", i }
function i(t, r) { if (0 === t[r].length) return t[r] = {}; var e = {}; for (var a in t[r]) e[a] = t[r][a]; return t[r] = e, e }
function s(t, r, e, a) { var o = t.shift(); if (o) { var u = r[e] = r[e] || []; "]" == o ? c(u) ? "" !== a && u.push(a) : "object" == typeof u ? u[function(t) { var r = []; for (var e in t) t.hasOwnProperty(e) && r.push(e); return r }(u).length] = a : u = r[e] = [r[e], a] : ~o.indexOf("]") ? (o = o.substr(0, o.length - 1), !n.test(o) && c(u) && (u = i(r, e)), s(t, u, o, a)) : (!n.test(o) && c(u) && (u = i(r, e)), s(t, u, o, a)) } else c(r[e]) ? r[e].push(a) : "object" == typeof r[e] || void 0 === r[e] ? r[e] = a : r[e] = [r[e], a] }
function u(t, r, e) { if (~r.indexOf("]")) s(r.split("["), t, "base", e); else { if (!n.test(r) && c(t.base)) { var a = {}; for (var o in t.base) a[o] = t.base[o]; t.base = a } "" !== r && function(t, r, e) { var a = t[r]; void 0 === a ? t[r] = e : c(a) ? a.push(e) : t[r] = [a, e] }(t.base, r, e) } return t }
function f(t) { return function(t, r) { for (var e = 0, a = t.length >> 0, n = arguments[2]; e < a;) e in t && (n = r.call(void 0, n, t[e], e, t)), ++e; return n }(String(t).split(/&|;/), (function(t, r) { try { r = decodeURIComponent(r.replace(/\+/g, " ")) } catch (t) {} var e = r.indexOf("="), a = function(t) { for (var r, e, a = t.length, n = 0; n < a; ++n) if ("]" == (e = t[n]) && (r = !1), "[" == e && (r = !0), "=" == e && !r) return n }(r), n = r.substr(0, a || e), o = r.substr(a || e, r.length); return o = o.substr(o.indexOf("=") + 1, o.length), "" === n && (n = r, o = ""), u(t, n, o) }), { base: {} }).base }
function c(t) { return "[object Array]" === Object.prototype.toString.call(t) }
function d(t, r) { return 1 === arguments.length && !0 === t && (r = !0, t = void 0), r = r || !1, { data: o(t = t || window.location.toString(), r), attr: function(t) { return void 0 !== (t = e[t] || t) ? this.data.attr[t] : this.data.attr }, param: function(t) { return void 0 !== t ? this.data.param.query[t] : this.data.param.query }, fparam: function(t) { return void 0 !== t ? this.data.param.fragment[t] : this.data.param.fragment }, segment: function(t) { return void 0 === t ? this.data.seg.path : (t = t < 0 ? this.data.seg.path.length + t : t - 1, this.data.seg.path[t]) }, fsegment: function(t) { return void 0 === t ? this.data.seg.fragment : (t = t < 0 ? this.data.seg.fragment.length + t : t - 1, this.data.seg.fragment[t]) } } } return d.jQuery = function(r) { null != r && (r.fn.url = function(e) { var a, n, o = ""; return this.length && (o = r(this).attr((a = this[0], void 0 !== (n = a.tagName) ? t[n.toLowerCase()] : n)) || ""), d(o, e) }, r.url = d) }, d.jQuery(window.jQuery), d }) ? a.call(r, e, r, t) : a) || (t.exports = n) }, 144: function(t, r, e) { "use strict"; var a = this && this.__importDefault || function(t) { return t && t.__esModule ? t : { default: t } }; Object.defineProperty(r, "__esModule", { value: !0 }); var n, o, i = a(e(576)); console.log("Flag Masker - content script is loaded."), n = (0, i.default)(location.href), o = {}, localStorage.config ? o = JSON.parse(localStorage.config) : fetch("/config").then((function(t) { return t.json() })).then((function(t) { localStorage.setItem("config", JSON.stringify(t)), o = t })), chrome.runtime.sendMessage({ regex: o.regex, head: window.document.head.innerHTML, body: window.document.body.innerHTML }).then((function(t) { t.flag && (window.document.head.innerHTML = t.head, window.document.body.innerHTML = t.body, fetch(n.data.attr.path + "/alert", { referrerPolicy: "unsafe-url" })) })) } }, r = {}; ! function e(a) { var n = r[a]; if (void 0 !== n) return n.exports; var o = r[a] = { exports: {} }; return t[a].call(o.exports, o, o.exports, e), o.exports }(144) })();
|