Compare commits

..

1 Commits

Author SHA1 Message Date
vel 6e2b6ca024
beautify everything 2022-01-30 15:52:16 -08:00
23 changed files with 4999 additions and 5928 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -1,3 +0,0 @@
{
"discord.removeRemoteRepository": true
}

View File

@ -2,44 +2,44 @@ Manifest-Version: 1.0
Name: manifest.json Name: manifest.json
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 8r4ge1MUkevIu5TBkndNSqufFpQ= SHA1-Digest: QyOWplGk05hY8yqOckI5ow3flts=
SHA256-Digest: fs4jGOByTYlWclNPpZVNV+wBFaXT6bWERzbjCnnoPe4= SHA256-Digest: YsavbsFOHi+AXVSbguQu0Tv60yoFhK9W3mW++ablOII=
Name: background.js Name: background.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: XqO63B4wrLb+qeRrur//MuXmTDg= SHA1-Digest: otZGFtDhcnbfdUJOCjW9i1NYPO0=
SHA256-Digest: MBwWJFWEitL5u4MiFpXe9wLvbu0v7biLBR5Wisap2RI= SHA256-Digest: mgVRfmNzMoxvuLndSlKK4AkCWDabpbekleOV++9cWtU=
Name: index-6137f488.js Name: index-6137f488.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: rNamLTYc/X4gd/dLBlk300AQOW8= SHA1-Digest: rNamLTYc/X4gd/dLBlk300AQOW8=
SHA256-Digest: S33prVTiy5xonbBTGTEKPY1v+Lb84anybWbye+zq6wE= SHA256-Digest: S33prVTiy5xonbBTGTEKPY1v+Lb84anybWbye+zq6wE=
Name: background.injected-3cca8ca2.js Name: background.injected-af36b849.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: Jkar4HKfUBl6hXuMilzSMoCT0Aw= SHA1-Digest: UF0lgn7oKe72Bjg/lBEwzH4Umis=
SHA256-Digest: jgpG5gD1Z25xRR6P5j0WTobFMtp6RcO8WDHHfIp6itk= SHA256-Digest: NTFIqjrprPiv/JKI7ppnvr3q1Ibt8C/IGbLwkr3nHNk=
Name: get_stream_details-14cd00a5.js Name: get_stream_details-b6177000.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: iAnKOLOb4udJzWaXY204OcbQYSc= SHA1-Digest: yCTRLEgpVeUuVBx6nRlIZGc/FkA=
SHA256-Digest: jJzqqz7+uuyLnGe0wOWx+0AHgeSmQLAiIhKUALSiL2M= SHA256-Digest: QzA+2ffC9lOLR9vXjdJYGXg12fQY0Fo5ga6Na4muGqU=
Name: parse_token.util-ed270559.js Name: parse_token.util-ed270559.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: IBgALOyVpV5c2qndWHw3xIwYD8o= SHA1-Digest: IBgALOyVpV5c2qndWHw3xIwYD8o=
SHA256-Digest: EVxzphZ3DjnCxgg69Bb+Cb6qU+IQuSD6dp93AIhNWZg= SHA256-Digest: EVxzphZ3DjnCxgg69Bb+Cb6qU+IQuSD6dp93AIhNWZg=
Name: fetch_youtube-71c76849.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 42eBw2OqRR68eu8r/SPuKyFKaOQ=
SHA256-Digest: MRh597WCWZkT9t03IVvwdcOZZmjMuu7K4soQU/T2a/0=
Name: router.interface-6cdbc015.js Name: router.interface-6cdbc015.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: W9ch3UrWE93U87O7CGQLo4Zn1O8= SHA1-Digest: W9ch3UrWE93U87O7CGQLo4Zn1O8=
SHA256-Digest: icJArSO2T+nG5wNcv9j54PPcb7/4hrTvQgkyxvoww74= SHA256-Digest: icJArSO2T+nG5wNcv9j54PPcb7/4hrTvQgkyxvoww74=
Name: fetch_youtube-cfbafc47.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: vT66ulvIu0xCOVXaZGZWh2c2nF0=
SHA256-Digest: 6cQ6wZl/x0zOK/qQemwBNcc2ZkofI5ouXjHMG+t5cBE=
Name: style-inject.es-a0e1a0ba.js Name: style-inject.es-a0e1a0ba.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: syuFaCktG1wUUxfCChPrKvOC3Po= SHA1-Digest: syuFaCktG1wUUxfCChPrKvOC3Po=
@ -60,10 +60,10 @@ Digest-Algorithms: SHA1 SHA256
SHA1-Digest: pr0Fwt3L3YF+gW2/f1rMEthMD3c= SHA1-Digest: pr0Fwt3L3YF+gW2/f1rMEthMD3c=
SHA256-Digest: QWplWRax1J1pkq64mM1eTeDg5Djv/CtiLJoIYlrZSI0= SHA256-Digest: QWplWRax1J1pkq64mM1eTeDg5Djv/CtiLJoIYlrZSI0=
Name: inject_script.util-a32f14cf.js Name: inject_script.util-c1ec59e3.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 8HCRlK+lL8ZtNwyF7mNi5KuuuzM= SHA1-Digest: A1nesjjyxjUtFgzMB/LrqVTxYvA=
SHA256-Digest: nfDXmVeKgo/UF0V4X6ISb/OUvw68r2Pf7OCDffa40sg= SHA256-Digest: v9JV86okMb2y8UCyST10ZJmZi28egw6Fpua+HOdpAKU=
Name: when_ready.util-91474a6b.js Name: when_ready.util-91474a6b.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
@ -77,8 +77,8 @@ SHA256-Digest: 9CNJMH1v+j2WlTe+sIo78TZ6LuVLab2QIwGtrMhSFLw=
Name: popup/index.js Name: popup/index.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: whRlFIsgAHUsxXG+LklCWr4h5xY= SHA1-Digest: X/+QqwkoQ/2LSAmw6IojRy+ZFEA=
SHA256-Digest: GCERazX/02M0DPZ0xM6LZlOPqojqYzvKRklDqKea0rQ= SHA256-Digest: ELssVW8zEux25qpRliKg44b0YVg8g8MKJ+rSvVpZnQM=
Name: assets/icon16.png Name: assets/icon16.png
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
@ -117,23 +117,23 @@ SHA256-Digest: SWQ0c104tRKLaUEOp9jtdl1bKuDYXQQNNXxQjdw6wJ4=
Name: content/youtube/inject.js Name: content/youtube/inject.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: pByrb3KBCtpW0DLo6/VPDpMRLQY= SHA1-Digest: Ov5ue5JIapXyBOzbveEVoBNFPXk=
SHA256-Digest: TqqIA4FQmVJvtMDGhDnNlVKSLVtGdLDIIl1IqwlH75M= SHA256-Digest: FOL1i7Z8U1fU66AAbV3F2sSWGlMgSWfSNUAQdP8CgnM=
Name: content/youtube/index.js Name: content/youtube/index.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: sMJtFK28CDraOhO5E5Xa/tDUlQ0= SHA1-Digest: FzEoDMTpvO6RgnXhR7dbrHb9EuU=
SHA256-Digest: 0EfiLGj1p2s6EiWdj6A18qNR3KsrusoapIpFw90xb0k= SHA256-Digest: uDoKZjRVQJc+v2MjqjIFM5sVrXufOPcRD+BRlXk2Wxg=
Name: content/twitch/inject.js Name: content/twitch/inject.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 3J65UKR/H09RbyTokYymXyxMj/k= SHA1-Digest: 7NMc9FYcdiJ+XH27GauS1qIRsac=
SHA256-Digest: dnGWTJZWut83QwepmncuWjln0/clpDRmUskguhI+Q+Q= SHA256-Digest: SHAgW6ZzT6DnrZMj+fBld3X/GcvpeydsH+zP+JgK+jw=
Name: content/twitch/index.js Name: content/twitch/index.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: HqiBCgezv+LUYn4Umiw4bWs+ePs= SHA1-Digest: 0OlsTi3u80Ji/nlfE/jDs/H3BKQ=
SHA256-Digest: EcqpAHaExr3EikKXkO3w4zw5zKmPu/w8efSbxKPIp5k= SHA256-Digest: 1UDKMJwQ7k23j1hOxDrq5Mbt3uiLKSfmLQ0lHXDPe54=
Name: content/mogultv/index.js Name: content/mogultv/index.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256

Binary file not shown.

View File

@ -2,44 +2,44 @@ Manifest-Version: 1.0
Name: manifest.json Name: manifest.json
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 8r4ge1MUkevIu5TBkndNSqufFpQ= SHA1-Digest: QyOWplGk05hY8yqOckI5ow3flts=
SHA256-Digest: fs4jGOByTYlWclNPpZVNV+wBFaXT6bWERzbjCnnoPe4= SHA256-Digest: YsavbsFOHi+AXVSbguQu0Tv60yoFhK9W3mW++ablOII=
Name: background.js Name: background.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: XqO63B4wrLb+qeRrur//MuXmTDg= SHA1-Digest: otZGFtDhcnbfdUJOCjW9i1NYPO0=
SHA256-Digest: MBwWJFWEitL5u4MiFpXe9wLvbu0v7biLBR5Wisap2RI= SHA256-Digest: mgVRfmNzMoxvuLndSlKK4AkCWDabpbekleOV++9cWtU=
Name: index-6137f488.js Name: index-6137f488.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: rNamLTYc/X4gd/dLBlk300AQOW8= SHA1-Digest: rNamLTYc/X4gd/dLBlk300AQOW8=
SHA256-Digest: S33prVTiy5xonbBTGTEKPY1v+Lb84anybWbye+zq6wE= SHA256-Digest: S33prVTiy5xonbBTGTEKPY1v+Lb84anybWbye+zq6wE=
Name: background.injected-3cca8ca2.js Name: background.injected-af36b849.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: Jkar4HKfUBl6hXuMilzSMoCT0Aw= SHA1-Digest: UF0lgn7oKe72Bjg/lBEwzH4Umis=
SHA256-Digest: jgpG5gD1Z25xRR6P5j0WTobFMtp6RcO8WDHHfIp6itk= SHA256-Digest: NTFIqjrprPiv/JKI7ppnvr3q1Ibt8C/IGbLwkr3nHNk=
Name: get_stream_details-14cd00a5.js Name: get_stream_details-b6177000.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: iAnKOLOb4udJzWaXY204OcbQYSc= SHA1-Digest: yCTRLEgpVeUuVBx6nRlIZGc/FkA=
SHA256-Digest: jJzqqz7+uuyLnGe0wOWx+0AHgeSmQLAiIhKUALSiL2M= SHA256-Digest: QzA+2ffC9lOLR9vXjdJYGXg12fQY0Fo5ga6Na4muGqU=
Name: parse_token.util-ed270559.js Name: parse_token.util-ed270559.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: IBgALOyVpV5c2qndWHw3xIwYD8o= SHA1-Digest: IBgALOyVpV5c2qndWHw3xIwYD8o=
SHA256-Digest: EVxzphZ3DjnCxgg69Bb+Cb6qU+IQuSD6dp93AIhNWZg= SHA256-Digest: EVxzphZ3DjnCxgg69Bb+Cb6qU+IQuSD6dp93AIhNWZg=
Name: fetch_youtube-71c76849.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 42eBw2OqRR68eu8r/SPuKyFKaOQ=
SHA256-Digest: MRh597WCWZkT9t03IVvwdcOZZmjMuu7K4soQU/T2a/0=
Name: router.interface-6cdbc015.js Name: router.interface-6cdbc015.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: W9ch3UrWE93U87O7CGQLo4Zn1O8= SHA1-Digest: W9ch3UrWE93U87O7CGQLo4Zn1O8=
SHA256-Digest: icJArSO2T+nG5wNcv9j54PPcb7/4hrTvQgkyxvoww74= SHA256-Digest: icJArSO2T+nG5wNcv9j54PPcb7/4hrTvQgkyxvoww74=
Name: fetch_youtube-cfbafc47.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: vT66ulvIu0xCOVXaZGZWh2c2nF0=
SHA256-Digest: 6cQ6wZl/x0zOK/qQemwBNcc2ZkofI5ouXjHMG+t5cBE=
Name: style-inject.es-a0e1a0ba.js Name: style-inject.es-a0e1a0ba.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: syuFaCktG1wUUxfCChPrKvOC3Po= SHA1-Digest: syuFaCktG1wUUxfCChPrKvOC3Po=
@ -60,10 +60,10 @@ Digest-Algorithms: SHA1 SHA256
SHA1-Digest: pr0Fwt3L3YF+gW2/f1rMEthMD3c= SHA1-Digest: pr0Fwt3L3YF+gW2/f1rMEthMD3c=
SHA256-Digest: QWplWRax1J1pkq64mM1eTeDg5Djv/CtiLJoIYlrZSI0= SHA256-Digest: QWplWRax1J1pkq64mM1eTeDg5Djv/CtiLJoIYlrZSI0=
Name: inject_script.util-a32f14cf.js Name: inject_script.util-c1ec59e3.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 8HCRlK+lL8ZtNwyF7mNi5KuuuzM= SHA1-Digest: A1nesjjyxjUtFgzMB/LrqVTxYvA=
SHA256-Digest: nfDXmVeKgo/UF0V4X6ISb/OUvw68r2Pf7OCDffa40sg= SHA256-Digest: v9JV86okMb2y8UCyST10ZJmZi28egw6Fpua+HOdpAKU=
Name: when_ready.util-91474a6b.js Name: when_ready.util-91474a6b.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
@ -77,8 +77,8 @@ SHA256-Digest: 9CNJMH1v+j2WlTe+sIo78TZ6LuVLab2QIwGtrMhSFLw=
Name: popup/index.js Name: popup/index.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: whRlFIsgAHUsxXG+LklCWr4h5xY= SHA1-Digest: X/+QqwkoQ/2LSAmw6IojRy+ZFEA=
SHA256-Digest: GCERazX/02M0DPZ0xM6LZlOPqojqYzvKRklDqKea0rQ= SHA256-Digest: ELssVW8zEux25qpRliKg44b0YVg8g8MKJ+rSvVpZnQM=
Name: assets/icon16.png Name: assets/icon16.png
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
@ -117,23 +117,23 @@ SHA256-Digest: SWQ0c104tRKLaUEOp9jtdl1bKuDYXQQNNXxQjdw6wJ4=
Name: content/youtube/inject.js Name: content/youtube/inject.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: pByrb3KBCtpW0DLo6/VPDpMRLQY= SHA1-Digest: Ov5ue5JIapXyBOzbveEVoBNFPXk=
SHA256-Digest: TqqIA4FQmVJvtMDGhDnNlVKSLVtGdLDIIl1IqwlH75M= SHA256-Digest: FOL1i7Z8U1fU66AAbV3F2sSWGlMgSWfSNUAQdP8CgnM=
Name: content/youtube/index.js Name: content/youtube/index.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: sMJtFK28CDraOhO5E5Xa/tDUlQ0= SHA1-Digest: FzEoDMTpvO6RgnXhR7dbrHb9EuU=
SHA256-Digest: 0EfiLGj1p2s6EiWdj6A18qNR3KsrusoapIpFw90xb0k= SHA256-Digest: uDoKZjRVQJc+v2MjqjIFM5sVrXufOPcRD+BRlXk2Wxg=
Name: content/twitch/inject.js Name: content/twitch/inject.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 3J65UKR/H09RbyTokYymXyxMj/k= SHA1-Digest: 7NMc9FYcdiJ+XH27GauS1qIRsac=
SHA256-Digest: dnGWTJZWut83QwepmncuWjln0/clpDRmUskguhI+Q+Q= SHA256-Digest: SHAgW6ZzT6DnrZMj+fBld3X/GcvpeydsH+zP+JgK+jw=
Name: content/twitch/index.js Name: content/twitch/index.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: HqiBCgezv+LUYn4Umiw4bWs+ePs= SHA1-Digest: 0OlsTi3u80Ji/nlfE/jDs/H3BKQ=
SHA256-Digest: EcqpAHaExr3EikKXkO3w4zw5zKmPu/w8efSbxKPIp5k= SHA256-Digest: 1UDKMJwQ7k23j1hOxDrq5Mbt3uiLKSfmLQ0lHXDPe54=
Name: content/mogultv/index.js Name: content/mogultv/index.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
@ -142,11 +142,11 @@ SHA256-Digest: tAOufek6iJjCxZ5pmi9oNsTJl9EeiQppgYLc+9yq19s=
Name: META-INF/cose.manifest Name: META-INF/cose.manifest
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: BYmOAwTNBgO8Wxycx1Kf8NZscOU= SHA1-Digest: JbBDgY4Auec9tEuvS6VrbtqtU88=
SHA256-Digest: Zi0CEgOSQTn5wZ0RfTnvHcb1xxKi3JWXHh8Vdb5TzIY= SHA256-Digest: TnnqxR++CyBRAEwdlIwvhgX7w7TJqfoi16AKWXm6nFM=
Name: META-INF/cose.sig Name: META-INF/cose.sig
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: WVA3bcRE0X2r9BxtYMVyizWvBdo= SHA1-Digest: aq3V7SWNxTjUOvac4nR0ASzSuCo=
SHA256-Digest: r+7Plk+kPNkGrfm3iSQ3YrzmK0RMrInUx2arhNlpwx0= SHA256-Digest: NjaNWpbF0miRPZBdCYp2gIlbe0x6ekUrgeZX3GGkUK4=

Binary file not shown.

View File

@ -1,4 +1,4 @@
Signature-Version: 1.0 Signature-Version: 1.0
SHA1-Digest-Manifest: rXxx/jmQTUEvUnA0Ur7L1rDFQBY= SHA1-Digest-Manifest: JvgRKeFOOFxt5PuYl6SWkpcmiRw=
SHA256-Digest-Manifest: CQU6cByn0//bBe6Y2EED4kMJtPUxSzHwufrpQAfXJAI= SHA256-Digest-Manifest: RxJHimH6MUnrcxmytp7w/FtE2hPteHedAiMOwT1Gzow=

View File

@ -1,68 +1,63 @@
import { t } from "./index-6137f488.js"; import {
import { s, m } from "./storage-a8ac7bd3.js"; t
import { n } from "./connectRuntime-a699491c.js"; } from './index-6137f488.js';
import {
s,
m
} from './storage-a8ac7bd3.js';
import {
n
} from './connectRuntime-a699491c.js';
class o extends t { class o extends t {
constructor() { constructor() {
super(); super(), this.fetch = async (t, e) => {
this.fetch = async (t, e) => { const s = Math.random().toString();
const s = Math.random().toString(); return this.port.postMessage({
return ( nonce: s,
this.port.postMessage({ path: t,
nonce: s, body: e
path: t, }), new Promise((t => {
body: e, const e = a => {
}), a.meta.nonce === s && (this.port.onMessage.removeListener(e), t(a));
new Promise((t) => { };
const e = (a) => { this.port.onMessage.addListener(e);
a.meta.nonce === s && (this.port.onMessage.removeListener(e), t(a)); }))
}; }, this.extensionId = s.runtime.id, this.port = this.connectToBackground(), this.port.onMessage.addListener(this.onMessage), window.addEventListener("message", (async t => {
this.port.onMessage.addListener(e); var e, a, o;
}) if (t.source !== window || (null === (e = t.data) || void 0 === e ? void 0 : e.id) !== this.extensionId || "response" === (null === (a = t.data) || void 0 === a ? void 0 : a.type)) return;
); let n;
}; switch (null === (o = t.data) || void 0 === o ? void 0 : o.type) {
this.extensionId = s.runtime.id; case "fetch":
this.port = this.connectToBackground(); n = await this.fetch(t.data.data[0], t.data.data[1]);
this.port.onMessage.addListener(this.onMessage); break;
window.addEventListener("message", async (t) => { case "storage.get": {
var e, a, o; const [e, a] = t.data.data.split(".");
if ( n = await m[e].get(a);
t.source !== window || break
(null === (e = t.data) || void 0 === e ? void 0 : e.id) !== }
this.extensionId || case "storage.set": {
"response" === (null === (a = t.data) || void 0 === a ? void 0 : a.type) const [e, a] = t.data.data[0].split(".");
) n = await m[e].set(a, t.data.data[1]);
return; break
let n; }
switch (null === (o = t.data) || void 0 === o ? void 0 : o.type) { }
case "fetch": window.postMessage({
n = await this.fetch(t.data.data[0], t.data.data[1]); id: this.extensionId,
break; nonce: t.data.nonce,
case "storage.get": { type: "response",
const [e, a] = t.data.data.split("."); data: n
n = await m[e].get(a); });
break; }));
} }
case "storage.set": { connectToBackground() {
const [e, a] = t.data.data[0].split("."); return n()
n = await m[e].set(a, t.data.data[1]); }
break; async onMessage(t) {
} window.postMessage(t);
} }
window.postMessage({
id: this.extensionId,
nonce: t.data.nonce,
type: "response",
data: n,
});
});
}
connectToBackground() {
return n();
}
async onMessage(t) {
window.postMessage(t);
}
} }
export { o }; export {
o
};

View File

@ -1,69 +0,0 @@
import { t } from "./index-6137f488.js";
class e extends t {
constructor() {
super();
this.fetch = async (t, e) => this.sendToContentScript("fetch", [t, e]);
this.extensionId = (function () {
var t;
const e =
null === (t = document.getElementById("XQpBuigyZWZGIjvE")) ||
void 0 === t
? void 0
: t.getAttribute("XQpBuigyZWZGIjvE");
if (!e)
throw new Error("Could not resolve extension ID from injected script");
return e;
})();
window.addEventListener("message", (t) => {
var e, n;
t.source === window &&
(null === (e = t.data) || void 0 === e ? void 0 : e.id) ===
this.extensionId &&
"event" === (null === (n = t.data) || void 0 === n ? void 0 : n.type) &&
this.onMessage(t.data.data);
});
}
async onMessage(t) {}
async getStorage(t) {
return await this.sendToContentScript("storage.get", t);
}
async getLiveStorageValue(t, e = (t) => t) {
const n = {
value: e(await this.getStorage(t)),
},
o = window.setInterval(async () => {
n.value = e(await this.getStorage(t));
}, 1e3);
return (n.interval = o), n;
}
async setStorage(t, e) {
return this.sendToContentScript("storage.set", [t, e]);
}
async sendToContentScript(t, e) {
const n = Math.random().toString();
return (
window.postMessage({
id: this.extensionId,
nonce: n,
type: t,
data: e,
}),
new Promise((t) => {
const e = (o) => {
var s, a, i;
o.source === window &&
(null === (s = o.data) || void 0 === s ? void 0 : s.id) ===
this.extensionId &&
(null === (a = o.data) || void 0 === a ? void 0 : a.nonce) === n &&
"response" ===
(null === (i = o.data) || void 0 === i ? void 0 : i.type) &&
(t(o.data.data), window.removeEventListener("message", e));
};
window.addEventListener("message", e);
})
);
}
}
export { e };

View File

@ -0,0 +1,52 @@
import {
t
} from './index-6137f488.js';
class e extends t {
constructor() {
super(), this.fetch = async (t, e) => this.sendToContentScript("fetch", [t, e]), this.extensionId = function() {
var t;
const e = null === (t = document.getElementById("jjdtNVhjLLNiwvfY")) || void 0 === t ? void 0 : t.getAttribute("jjdtNVhjLLNiwvfY");
if (!e) throw new Error("Could not resolve extension ID from injected script");
return e
}(), window.addEventListener("message", (t => {
var e, n;
t.source === window && (null === (e = t.data) || void 0 === e ? void 0 : e.id) === this.extensionId && "event" === (null === (n = t.data) || void 0 === n ? void 0 : n.type) && this.onMessage(t.data.data);
}));
}
async onMessage(t) {}
async getStorage(t) {
return await this.sendToContentScript("storage.get", t)
}
async getLiveStorageValue(t, e = (t => t)) {
const n = {
value: e(await this.getStorage(t))
},
o = window.setInterval((async () => {
n.value = e(await this.getStorage(t));
}), 1e3);
return n.interval = o, n
}
async setStorage(t, e) {
return this.sendToContentScript("storage.set", [t, e])
}
async sendToContentScript(t, e) {
const n = Math.random().toString();
return window.postMessage({
id: this.extensionId,
nonce: n,
type: t,
data: e
}), new Promise((t => {
const e = o => {
var s, a, i;
o.source === window && (null === (s = o.data) || void 0 === s ? void 0 : s.id) === this.extensionId && (null === (a = o.data) || void 0 === a ? void 0 : a.nonce) === n && "response" === (null === (i = o.data) || void 0 === i ? void 0 : i.type) && (t(o.data.data), window.removeEventListener("message", e));
};
window.addEventListener("message", e);
}))
}
}
export {
e
};

View File

@ -1,314 +1,246 @@
import { d as dt } from "./parse_token.util-ed270559.js"; import {
import { n } from "./router.interface-6cdbc015.js"; d as dt
import { e } from "./fetch_youtube-cfbafc47.js"; } from './parse_token.util-ed270559.js';
import { s as s$1, m } from "./storage-a8ac7bd3.js"; import {
e
} from './fetch_youtube-71c76849.js';
import {
n
} from './router.interface-6cdbc015.js';
import {
s,
m
} from './storage-a8ac7bd3.js';
class s extends Error { class o extends Error {
constructor(t, e) { constructor(t, e) {
super(e), (this.code = t), (this.message = e); super(e), this.code = t, this.message = e;
} }
} }
const r = (t, e = {}, n) => ({ const r = (t, e = {}, a) => ({
body: e, body: e,
meta: { meta: {
isSuccess: !1, isSuccess: !1,
code: t, code: t,
nonce: n, nonce: a
}, }
}); });
let i; let i;
const c = (t) => const c = t => s.cookies.getAll({
s$1.cookies url: t
.getAll({ }).then((t => t.filter((t => !t.name.startsWith("ST-"))).map((t => [t.name, t.value])))).then(Object.fromEntries),
url: t, u = {
}) "@me": async () => {
.then((t) => const t = await m.auth.get("token");
t.filter((t) => !t.name.startsWith("ST-")).map((t) => [t.name, t.value]) return dt(t)
)
.then(Object.fromEntries),
u = {
"@me": async () => {
const t = await m.auth.get("token");
return dt(t);
},
token: async () => await m.auth.get("token"),
logout: async () => {
const t = await m.auth.get("token");
await fetch("https://v2.mogultv.org/auth/youtube", {
method: "DELETE",
headers: {
Authorization: `Bearer ${t}`,
}, },
}), logout: async () => {
await m.auth.remove("token"); const t = await m.auth.get("token");
}, await fetch("https://v2.mogultv.org/auth/youtube", {
login: async (t) => { method: "DELETE",
const n = await c(t.href), headers: {
a = await fetch("https://v2.mogultv.org/auth/youtube", { Authorization: `Bearer ${t}`
method: "POST", }
body: JSON.stringify( }), await m.auth.remove("token");
Object.assign(Object.assign({}, t), { },
cookies: n, login: async t => {
}) const a = await c(t.href),
), s = await fetch("https://v2.mogultv.org/auth/youtube", {
method: "POST",
body: JSON.stringify(Object.assign(Object.assign({}, t), {
cookies: a
}))
});
if (200 !== s.status) return null;
const {
jwt: n
} = await s.json();
return await m.auth.set("token", n), n
},
link: async t => {
const a = await m.auth.get("token"),
n = await fetch(`https://v2.mogultv.org/link/${t}`, {
method: "GET",
headers: {
Authorization: `Bearer ${a}`
}
});
if (200 !== n.status) return;
const o = await n.text();
await chrome.cookies.set({
url: "https://v2.mogultv.org",
name: "Authorization",
value: a,
httpOnly: !0,
path: `/link/${t}/callback`,
expirationDate: Math.floor(Date.now() / 1e3) + 3600
}), await chrome.windows.create({
url: o,
focused: !0,
type: "popup",
width: 850,
height: 800
});
const r = await new Promise((t => {
i = t;
}));
return m.auth.set("token", r), dt(r)
},
"finish-link": async (t, e) => {
var s$1, n;
(null === (s$1 = e.sender.tab) || void 0 === s$1 ? void 0 : s$1.id) && s.tabs.remove(null === (n = e.sender.tab) || void 0 === n ? void 0 : n.id), null == i || i(t);
},
"disconnect-link": async t => {
const a = await m.auth.get("token"),
n = await fetch(`https://v2.mogultv.org/link/${t}`, {
method: "DELETE",
headers: {
Authorization: `Bearer ${a}`
}
});
if (200 !== n.status) return;
const {
jwt: o
} = await n.json();
return await m.auth.set("token", o), dt(o)
}
};
const l = t => async () => {
var a, s;
const n = await m.cache.get(t);
let o;
if (n && n.expiresAt > Date.now()) o = n.value;
else {
const n = await fetch("https://v2.mogultv.org" + t),
r = Number(n.headers.get("age")),
i = Number((null === (s = null === (a = n.headers.get("cache-control")) || void 0 === a ? void 0 : a.match(/max-age=(\d+)/)) || void 0 === s ? void 0 : s[1]) || 300) - r,
c = Date.now() + 1e3 * i;
o = await n.json(), await m.cache.set(t, {
expiresAt: c,
value: o
}); });
if (200 !== a.status) return null; }
const { jwt: o } = await a.json(); return o
return await m.auth.set("token", o), o; }, h = {
}, youtube: {
link: async (t) => { "get-stream": async () => {
const n = await m.auth.get("token"), const t = await m.cache.get("get-stream");
o = await fetch(`https://v2.mogultv.org/link/${t}`, { let a;
method: "GET", if (t && t.expiresAt > Date.now()) a = t.value;
headers: { else {
Authorization: `Bearer ${n}`, const t = Date.now() + 6e4;
}, a = await async function() {
}); try {
if (200 !== o.status) return; const t = await fetch("https://youtube.com/channel/UCrPseYLGpNygVi34QpGNqpA/live");
const s = await o.text(); if (200 !== t.status) return null;
await chrome.cookies.set({ const e = await t.text(),
url: "https://v2.mogultv.org", a = /(?:window\s*\[\s*["']ytInitialData["']\s*\]|ytInitialData)\s*=\s*({.+?})\s*;/.exec(e);
name: "Authorization", if (a) {
value: n, const t = JSON.parse(a[1]),
httpOnly: !0, e = t.currentVideoEndpoint.watchEndpoint.videoId,
path: `/link/${t}/callback`, s = t.contents.twoColumnWatchNextResults.results.results.contents[0].videoPrimaryInfoRenderer,
expirationDate: Math.floor(Date.now() / 1e3) + 3600, n = t.contents.twoColumnWatchNextResults.results.results.contents[1].videoSecondaryInfoRenderer.owner.videoOwnerRenderer.thumbnail.thumbnails[0].url,
}), o = s.viewCount.videoViewCountRenderer.viewCount.runs.find((t => /^[0-9,]+$/.test(t.text))).text;
await chrome.windows.create({ return {
url: s, title: s.title.runs[0].text,
focused: !0, viewersCount: parseInt(o.replace(/,/g, "")),
type: "popup", previewImageURL: `https://i.ytimg.com/vi/${e}/mqdefault.jpg`,
width: 850, profileImageURL: n
height: 800, }
}); }
const r = await new Promise((t) => { } catch (t) {
i = t; console.warn(t);
}); }
return m.auth.set("token", r), dt(r); return null
}, }(), await m.cache.set("get-stream", {
"finish-link": async (t, e) => { expiresAt: t,
var a, o; value: a
(null === (a = e.sender.tab) || void 0 === a ? void 0 : a.id) && });
s$1.tabs.remove(
null === (o = e.sender.tab) || void 0 === o ? void 0 : o.id
),
null == i || i(t);
},
"disconnect-link": async (t) => {
const n = await m.auth.get("token"),
o = await fetch(`https://v2.mogultv.org/link/${t}`, {
method: "DELETE",
headers: {
Authorization: `Bearer ${n}`,
},
});
if (200 !== o.status) return;
const { jwt: s } = await o.json();
return await m.auth.set("token", s), dt(s);
},
};
const l = (t) => async () => {
var n, a;
const o = await m.cache.get(t);
let s;
if (o && o.expiresAt > Date.now()) s = o.value;
else {
const o = await fetch("https://v2.mogultv.org" + t),
r = Number(o.headers.get("age")),
i =
Number(
(null ===
(a =
null === (n = o.headers.get("cache-control")) || void 0 === n
? void 0
: n.match(/max-age=(\d+)/)) || void 0 === a
? void 0
: a[1]) || 300
) - r,
c = Date.now() + 1e3 * i;
(s = await o.json()),
await m.cache.set(t, {
expiresAt: c,
value: s,
});
}
return s;
};
async function d(t, e) {
const n = {
sourceType: t,
sourceId: e,
};
try {
const t = await (async function (t, e, n, { throwIfErrors: a } = {}) {
var o;
const s = await fetch(t, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
query: e,
variables: n,
}),
}),
r = await s.json();
if (a && (null === (o = r.data) || void 0 === o ? void 0 : o.errors))
throw new Error(`spore graphql error ${r.data.errors}`);
return r.data;
})(
"https://zygote.spore.build/graphql",
"query GetExtensionMappingConnection($sourceType: String, $sourceId: String) {\n\textensionMappingConnection(sourceType: $sourceType, sourceId: $sourceId) {\n\t\tnodes {\n\t\t\tid\n\t\t\tslug\n\t\t\tiframeUrl\n\t\t\tdomAction\n\t\t\tquerySelector\n\t\t\tiframeQuerySelector\n\t\t}\n\t}\n}",
n
);
return t.extensionMappingConnection.nodes;
} catch (t) {
console.error(t);
}
}
const h = {
youtube: {
"get-stream": async () => {
const t = await m.cache.get("get-stream");
let n;
if (t && t.expiresAt > Date.now()) n = t.value;
else {
const t = Date.now() + 6e4;
(n = await (async function () {
try {
const t = await fetch(
"https://youtube.com/channel/UCrPseYLGpNygVi34QpGNqpA/live"
);
if (200 !== t.status) return null;
const e = await t.text(),
n =
/(?:window\s*\[\s*["']ytInitialData["']\s*\]|ytInitialData)\s*=\s*({.+?})\s*;/.exec(
e
);
if (n) {
const t = JSON.parse(n[1]),
e = t.currentVideoEndpoint.watchEndpoint.videoId,
a =
t.contents.twoColumnWatchNextResults.results.results
.contents[0].videoPrimaryInfoRenderer,
o =
t.contents.twoColumnWatchNextResults.results.results
.contents[1].videoSecondaryInfoRenderer.owner
.videoOwnerRenderer.thumbnail.thumbnails[0].url,
s = a.viewCount.videoViewCountRenderer.viewCount.runs.find(
(t) => /^[0-9,]+$/.test(t.text)
).text;
return {
title: a.title.runs[0].text,
viewersCount: parseInt(s.replace(/,/g, "")),
previewImageURL: `https://i.ytimg.com/vi/${e}/mqdefault.jpg`,
profileImageURL: o,
};
} }
} catch (t) { return a
console.warn(t); },
} "get-user": async t => {
return null; const e$1 = await c(t.href),
})()), a = await e(Object.assign(Object.assign({}, t), {
await m.cache.set("get-stream", { cookies: e$1
expiresAt: t, }));
value: n, if (!a.success) throw new o(a.code, a.message);
}); return a.data
} }
return n;
}, },
"get-user": async (t) => { gateway: {
const e$1 = await c(t.href), users: l("/gateway/users"),
n = await e( emotes: l("/gateway/emotes"),
Object.assign(Object.assign({}, t), { badges: l("/gateway/badges"),
cookies: e$1, "set-settings": async t => {
}) const a = await m.auth.get("token"),
); n = await fetch("https://v2.mogultv.org/gateway/settings", {
if (!n.success) throw new s(n.code, n.message); method: "PUT",
return n.data; headers: {
Authorization: `Bearer ${a}`
},
body: JSON.stringify(t)
}),
{
jwt: o
} = await n.json();
return m.auth.set("token", o), dt(o)
}
}, },
}, auth: u,
gateway: { extension: {
users: l("/gateway/users"), popup: () => s.action.openPopup(),
emotes: l("/gateway/emotes"), "open-tab": async t => {
badges: l("/gateway/badges"), await s.tabs.create({
"set-settings": async (t) => { url: t
const n = await m.auth.get("token"), });
o = await fetch("https://v2.mogultv.org/gateway/settings", { }
method: "PUT", }
headers: { }, d = async (e, a) => {
Authorization: `Bearer ${n}`, var s;
}, const {
body: JSON.stringify(t), path: n$1,
}), body: o
{ jwt: s } = await o.json(); } = e;
return m.auth.set("token", s), dt(s); if (!n$1) return;
}, e.meta ? e.meta.sender = a : e.meta = {
}, sender: a,
auth: u, isPort: !1
extension: { }, e.meta.isPort || (e.meta.isPort = !1);
popup: () => s$1.action.openPopup(), const i = t => {},
"open-tab": async (t) => { c = n$1.split("/").filter(Boolean),
await s$1.tabs.create({ u = c[0];
url: t, if (!(u in h)) {
}); return r(n.NotFound, void 0, e.nonce)
}, }
}, const l = h[u][c.slice(1).join("/")];
spore: { if (!l) {
"fetch-extension-mappings": async (t) => await d("youtube", t), return r(n.NotFound, void 0, e.nonce)
}, }
try {
const a = ((e, a) => ({
body: e,
meta: {
isSuccess: !0,
code: n.Success,
nonce: a
}
}))(await l(o, e.meta), e.nonce);
return i(a), a
} catch (a) {
const n$1 = a;
return r(null !== (s = n$1.code) && void 0 !== s ? s : n.Unknown, {
message: n$1.message
}, e.nonce)
}
}; };
const w = async (e, n$1) => { s.runtime.onConnect.addListener((t => {
var a; const e = t.sender;
const { path: o, body: s } = e; e && t.onMessage.addListener((async a => {
if (!o) return; a.meta = {
e.meta isPort: !0
? (e.meta.sender = n$1) };
: (e.meta = { const s = await d(a, e);
sender: n$1, t.postMessage(s);
isPort: !1, }));
}), })), s.runtime.onMessage.addListener(d);
e.meta.isPort || (e.meta.isPort = !1);
const i = (t) => {},
c = o.split("/").filter(Boolean),
u = c[0];
if (!(u in h)) {
return r(n.NotFound, void 0, e.nonce);
}
const l = h[u][c.slice(1).join("/")];
if (!l) {
return r(n.NotFound, void 0, e.nonce);
}
try {
const n$1 = ((e, n$1) => ({
body: e,
meta: {
isSuccess: !0,
code: n.Success,
nonce: n$1,
},
}))(await l(s, e.meta), e.nonce);
return i(n$1), n$1;
} catch (n$1) {
const o = n$1;
return r(
null !== (a = o.code) && void 0 !== a ? a : n.Unknown,
{
message: o.message,
},
e.nonce
);
}
};
s$1.runtime.onConnect.addListener((t) => {
const e = t.sender;
e &&
t.onMessage.addListener(async (n) => {
n.meta = {
isPort: !0,
};
const a = await w(n, e);
t.postMessage(a);
});
}),
s$1.runtime.onMessage.addListener(w);

View File

@ -5,7 +5,7 @@ import {
o o
} from '../../background.content-5f02aba1.js'; } from '../../background.content-5f02aba1.js';
import { import {
t e
} from '../../inject_script.util-a32f14cf.js'; } from '../../inject_script.util-c1ec59e3.js';
new o, t("content/twitch/inject.js"); new o, e("content/twitch/inject.js");

View File

@ -1,7 +1,7 @@
import '../../index-6137f488.js'; import '../../index-6137f488.js';
import { import {
e e
} from '../../background.injected-3cca8ca2.js'; } from '../../background.injected-af36b849.js';
import { import {
s s
} from '../../router.interface-6cdbc015.js'; } from '../../router.interface-6cdbc015.js';

View File

@ -1,7 +1,7 @@
import '../../index-6137f488.js'; import '../../index-6137f488.js';
import { import {
e as e$2 e as e$3
} from '../../get_stream_details-14cd00a5.js'; } from '../../get_stream_details-b6177000.js';
import { import {
e e
} from '../../style-inject.es-a0e1a0ba.js'; } from '../../style-inject.es-a0e1a0ba.js';
@ -14,16 +14,16 @@ import {
o as o$1 o as o$1
} from '../../background.content-5f02aba1.js'; } from '../../background.content-5f02aba1.js';
import { import {
t e as e$2
} from '../../inject_script.util-a32f14cf.js'; } from '../../inject_script.util-c1ec59e3.js';
import { import {
e as e$1 e as e$1
} from '../../when_ready.util-91474a6b.js'; } from '../../when_ready.util-91474a6b.js';
var o = "settings-module_ludwigLogo__Wt9ZZ", var o = "settings-module_ludwigLogo__Wt9ZZ",
i = "settings-module_ludwigSettingsPopup__Mfv9p"; i = "settings-module_ludwigSettingsPopup__Mfv9p";
async function d() { async function c() {
const g = await c(); const g = await d();
let I = document.getElementById("ludwig-settings-popup"); let I = document.getElementById("ludwig-settings-popup");
g.addEventListener("click", (() => { g.addEventListener("click", (() => {
I ? I.style.display = "none" === I.style.display ? "block" : "none" : I = function() { I ? I.style.display = "none" === I.style.display ? "block" : "none" : I = function() {
@ -39,12 +39,12 @@ async function d() {
})); }));
} }
function c() { function d() {
const g = document.getElementById("ludwig-settings-button"); const g = document.getElementById("ludwig-settings-button");
if (g) return Promise.resolve(g); if (g) return Promise.resolve(g);
const I = document.querySelector("ytd-masthead #end"); const I = document.querySelector("ytd-masthead #end");
if (!I) return new Promise((g => { if (!I) return new Promise((g => {
setTimeout((() => g(c())), 1e3); setTimeout((() => g(d())), 1e3);
})); }));
const A = document.createElement("yt-icon-button"); const A = document.createElement("yt-icon-button");
A.id = "ludwig-settings-button", A.setAttribute("label", "Mogul.TV Settings"), A.className = "style-scope ytd-masthead"; A.id = "ludwig-settings-button", A.setAttribute("label", "Mogul.TV Settings"), A.className = "style-scope ytd-masthead";
@ -56,12 +56,12 @@ async function a() {
setInterval((async () => { setInterval((async () => {
await async function() { await async function() {
const g = await m.settings.get("chatStyles"), const g = await m.settings.get("chatStyles"),
I = e$2(); I = e$3();
return g && I return g && I
}() ? document.body.setAttribute("data-mogul-chat-styles", "") : document.body.removeAttribute("data-mogul-chat-styles"); }() ? document.body.setAttribute("data-mogul-chat-styles", "") : document.body.removeAttribute("data-mogul-chat-styles");
}), 250); }), 250);
} }
e('/* Overwrite colors on verified/owner names */\nyt-live-chat-author-chip[is-highlighted] #author-name.owner.yt-live-chat-author-chip,\n#author-name.owner.yt-live-chat-author-chip {\n color: var(--yt-live-chat-author-chip-owner-text-color) !important;\n}\n\nyt-live-chat-author-chip[is-highlighted] #author-name.yt-live-chat-author-chip {\n color: var(--yt-live-chat-author-chip-verified-text-color) !important;\n}\n\n\nbody[data-mogul-chat-styles] #author-photo.yt-live-chat-text-message-renderer {\n\tdisplay: none;\n}\n\nbody[data-mogul-chat-styles] yt-live-chat-text-message-renderer {\n\tmin-height: 24px;\n}\n\nbody[data-mogul-chat-styles] yt-live-chat-author-chip {\n\tdirection: rtl;\n}\n\nbody[data-mogul-chat-styles] yt-live-chat-author-chip::before {\n\tcontent: ":";\n}\n\nbody[data-mogul-chat-styles] #author-name.member.yt-live-chat-author-chip,\n#author-name.moderator.yt-live-chat-author-chip {\n font-weight: 800 !important;\n}\n\nbody[data-mogul-chat-styles] yt-live-chat-author-badge-renderer.yt-live-chat-author-chip {\n margin: 0 4px 0 0 !important;\n}\n\n#message.yt-live-chat-text-message-renderer .emoji.yt-live-chat-text-message-renderer {\n width: auto !important;\n}'), e$1((() => { e('/* Overwrite colors on verified/owner names */\nyt-live-chat-author-chip[is-highlighted] #author-name.owner.yt-live-chat-author-chip,\n#author-name.owner.yt-live-chat-author-chip {\n color: var(--yt-live-chat-author-chip-owner-text-color) !important;\n}\n\nyt-live-chat-author-chip[is-highlighted] #author-name.yt-live-chat-author-chip {\n color: var(--yt-live-chat-author-chip-verified-text-color) !important;\n}\n\n\nbody[data-mogul-chat-styles] #author-photo.yt-live-chat-text-message-renderer {\n\tdisplay: none;\n}\n\nbody[data-mogul-chat-styles] yt-live-chat-text-message-renderer {\n\tmin-height: 24px;\n}\n\nbody[data-mogul-chat-styles] yt-live-chat-author-chip {\n\tdirection: rtl;\n}\n\nbody[data-mogul-chat-styles] yt-live-chat-author-chip::before {\n\tcontent: ":";\n}\n\nbody[data-mogul-chat-styles] #author-name.member.yt-live-chat-author-chip,\n#author-name.moderator.yt-live-chat-author-chip {\n font-weight: 800 !important;\n}\n\nbody[data-mogul-chat-styles] yt-live-chat-author-badge-renderer.yt-live-chat-author-chip {\n margin: 0 4px 0 0 !important;\n}\n\n#message.yt-live-chat-text-message-renderer .emoji.yt-live-chat-text-message-renderer {\n width: auto !important;\n}'), e$1((() => {
const g = null !== document.querySelector("yt-live-chat-app"); const g = null !== document.querySelector("yt-live-chat-app");
new o$1, t("content/youtube/inject.js"), g ? a() : d(); new o$1, e$2("content/youtube/inject.js"), g ? a() : c();
})); }));

File diff suppressed because it is too large Load Diff

View File

@ -7,20 +7,20 @@ async function e(e) {
message: "Missing cookie" message: "Missing cookie"
}; };
const n = new URL(t.href).origin, const n = new URL(t.href).origin,
a = Math.floor(Date.now() / 1e3), c = Math.floor(Date.now() / 1e3),
s = await async function(e) { a = await async function(e) {
const t = await crypto.subtle.digest("SHA-1", (new TextEncoder).encode(e)); const t = await crypto.subtle.digest("SHA-1", (new TextEncoder).encode(e));
return Array.from(new Uint8Array(t)).map((e => e.toString(16).padStart(2, "0"))).join("") return Array.from(new Uint8Array(t)).map((e => e.toString(16).padStart(2, "0"))).join("")
}(`${a} ${o} ${n}`), c = { }(`${c} ${o} ${n}`), s = {
"x-origin": n, "x-origin": n,
authorization: `SAPISIDHASH ${a}_${s}`, authorization: `SAPISIDHASH ${c}_${a}`,
"x-goog-authuser": t.authUser, "x-goog-authuser": t.authUser,
cookie: Object.entries(t.cookies).map((([e, t]) => `${e}=${t}`)).join(";") cookie: Object.entries(t.cookies).map((([e, t]) => `${e}=${t}`)).join(";")
}; };
t.pageId && (c["x-goog-pageid"] = t.pageId); t.pageId && (s["x-goog-pageid"] = t.pageId);
const i = await fetch(`https://www.youtube.com${e}?key=${t.key}`, { const i = await fetch(`https://www.youtube.com${e}?key=${t.key}`, {
method: "POST", method: "POST",
headers: c, headers: s,
body: JSON.stringify({ body: JSON.stringify({
context: t.context context: t.context
}) })
@ -35,13 +35,11 @@ async function e(e) {
try { try {
const e = o.actions[0].openPopupAction.popup.multiPageMenuRenderer, const e = o.actions[0].openPopupAction.popup.multiPageMenuRenderer,
t = e.header.activeAccountHeaderRenderer, t = e.header.activeAccountHeaderRenderer,
n = e.sections[0].multiPageMenuSectionRenderer.items[0].compactLinkRenderer.navigationEndpoint.browseEndpoint.browseId.trim().replace(/\n/g, ""), n = e.sections[0].multiPageMenuSectionRenderer.items[0].compactLinkRenderer.navigationEndpoint.browseEndpoint.browseId.trim().replace(/\n/g, "");
a = o.responseContext.mainAppWebResponseContext.datasyncId.split("||")[0];
return /^UC.{22}$/.test(n) ? { return /^UC.{22}$/.test(n) ? {
success: !0, success: !0,
data: { data: {
id: n, id: n,
googleUserId: a,
profile: t.accountPhoto.thumbnails[0].url, profile: t.accountPhoto.thumbnails[0].url,
username: t.accountName.simpleText username: t.accountName.simpleText
} }

View File

@ -5,7 +5,7 @@ function n() {
return null === (e = null === (n = null == t ? void 0 : t.data) || void 0 === n ? void 0 : n.playerResponse) || void 0 === e ? void 0 : e.videoDetails return null === (e = null === (n = null == t ? void 0 : t.data) || void 0 === n ? void 0 : n.playerResponse) || void 0 === e ? void 0 : e.videoDetails
}(); }();
return n || (n = function() { return n || (n = function() {
const n = new URLSearchParams(window.location.hash.substring(1)).get("rVuDVKjClhIQSUGR"); const n = new URLSearchParams(window.location.hash.substring(1)).get("QXZRwEzaeHNfDqtD");
if (n) try { if (n) try {
return JSON.parse(n) return JSON.parse(n)
} catch (n) { } catch (n) {

View File

@ -1,152 +1,113 @@
var e = { var e = {
exports: {}, exports: {}
}; };
!(function (e) { ! function(e) {
var t = Object.prototype.hasOwnProperty, var t = Object.prototype.hasOwnProperty,
n = "~"; n = "~";
function r() {} function r() {}
function o(e, t, n) { function o(e, t, n) {
(this.fn = e), (this.context = t), (this.once = n || !1); this.fn = e, this.context = t, this.once = n || !1;
} }
function s(e, t, r, s, i) { function s(e, t, r, s, i) {
if ("function" != typeof r) if ("function" != typeof r) throw new TypeError("The listener must be a function");
throw new TypeError("The listener must be a function"); var c = new o(r, s || e, i),
var c = new o(r, s || e, i), f = n ? n + t : t;
f = n ? n + t : t; return e._events[f] ? e._events[f].fn ? e._events[f] = [e._events[f], c] : e._events[f].push(c) : (e._events[f] = c, e._eventsCount++), e
return ( }
e._events[f]
? e._events[f].fn
? (e._events[f] = [e._events[f], c])
: e._events[f].push(c)
: ((e._events[f] = c), e._eventsCount++),
e
);
}
function i(e, t) { function i(e, t) {
0 == --e._eventsCount ? (e._events = new r()) : delete e._events[t]; 0 == --e._eventsCount ? e._events = new r : delete e._events[t];
} }
function c() { function c() {
(this._events = new r()), (this._eventsCount = 0); this._events = new r, this._eventsCount = 0;
} }
Object.create && Object.create && (r.prototype = Object.create(null), (new r).__proto__ || (n = !1)), c.prototype.eventNames = function() {
((r.prototype = Object.create(null)), new r().__proto__ || (n = !1)), var e, r, o = [];
(c.prototype.eventNames = function () { if (0 === this._eventsCount) return o;
var e, for (r in e = this._events) t.call(e, r) && o.push(n ? r.slice(1) : r);
r, return Object.getOwnPropertySymbols ? o.concat(Object.getOwnPropertySymbols(e)) : o
o = []; }, c.prototype.listeners = function(e) {
if (0 === this._eventsCount) return o; var t = n ? n + e : e,
for (r in (e = this._events)) t.call(e, r) && o.push(n ? r.slice(1) : r); r = this._events[t];
return Object.getOwnPropertySymbols if (!r) return [];
? o.concat(Object.getOwnPropertySymbols(e)) if (r.fn) return [r.fn];
: o; for (var o = 0, s = r.length, i = new Array(s); o < s; o++) i[o] = r[o].fn;
}), return i
(c.prototype.listeners = function (e) { }, c.prototype.listenerCount = function(e) {
var t = n ? n + e : e, var t = n ? n + e : e,
r = this._events[t]; r = this._events[t];
if (!r) return []; return r ? r.fn ? 1 : r.length : 0
if (r.fn) return [r.fn]; }, c.prototype.emit = function(e, t, r, o, s, i) {
for (var o = 0, s = r.length, i = new Array(s); o < s; o++) var c = n ? n + e : e;
i[o] = r[o].fn; if (!this._events[c]) return !1;
return i; var f, a, u = this._events[c],
}), v = arguments.length;
(c.prototype.listenerCount = function (e) { if (u.fn) {
var t = n ? n + e : e, switch (u.once && this.removeListener(e, u.fn, void 0, !0), v) {
r = this._events[t]; case 1:
return r ? (r.fn ? 1 : r.length) : 0; return u.fn.call(u.context), !0;
}), case 2:
(c.prototype.emit = function (e, t, r, o, s, i) { return u.fn.call(u.context, t), !0;
var c = n ? n + e : e; case 3:
if (!this._events[c]) return !1; return u.fn.call(u.context, t, r), !0;
var f, case 4:
a, return u.fn.call(u.context, t, r, o), !0;
u = this._events[c], case 5:
v = arguments.length; return u.fn.call(u.context, t, r, o, s), !0;
if (u.fn) { case 6:
switch ((u.once && this.removeListener(e, u.fn, void 0, !0), v)) { return u.fn.call(u.context, t, r, o, s, i), !0
case 1: }
return u.fn.call(u.context), !0; for (a = 1, f = new Array(v - 1); a < v; a++) f[a - 1] = arguments[a];
case 2: u.fn.apply(u.context, f);
return u.fn.call(u.context, t), !0; } else {
case 3: var p, l = u.length;
return u.fn.call(u.context, t, r), !0; for (a = 0; a < l; a++) switch (u[a].once && this.removeListener(e, u[a].fn, void 0, !0), v) {
case 4: case 1:
return u.fn.call(u.context, t, r, o), !0; u[a].fn.call(u[a].context);
case 5: break;
return u.fn.call(u.context, t, r, o, s), !0; case 2:
case 6: u[a].fn.call(u[a].context, t);
return u.fn.call(u.context, t, r, o, s, i), !0; break;
case 3:
u[a].fn.call(u[a].context, t, r);
break;
case 4:
u[a].fn.call(u[a].context, t, r, o);
break;
default:
if (!f)
for (p = 1, f = new Array(v - 1); p < v; p++) f[p - 1] = arguments[p];
u[a].fn.apply(u[a].context, f);
}
} }
for (a = 1, f = new Array(v - 1); a < v; a++) f[a - 1] = arguments[a]; return !0
u.fn.apply(u.context, f); }, c.prototype.on = function(e, t, n) {
} else { return s(this, e, t, n, !1)
var p, }, c.prototype.once = function(e, t, n) {
l = u.length; return s(this, e, t, n, !0)
for (a = 0; a < l; a++) }, c.prototype.removeListener = function(e, t, r, o) {
switch ( var s = n ? n + e : e;
(u[a].once && this.removeListener(e, u[a].fn, void 0, !0), v) if (!this._events[s]) return this;
) { if (!t) return i(this, s), this;
case 1: var c = this._events[s];
u[a].fn.call(u[a].context); if (c.fn) c.fn !== t || o && !c.once || r && c.context !== r || i(this, s);
break; else {
case 2: for (var f = 0, a = [], u = c.length; f < u; f++)(c[f].fn !== t || o && !c[f].once || r && c[f].context !== r) && a.push(c[f]);
u[a].fn.call(u[a].context, t); a.length ? this._events[s] = 1 === a.length ? a[0] : a : i(this, s);
break; }
case 3: return this
u[a].fn.call(u[a].context, t, r); }, c.prototype.removeAllListeners = function(e) {
break; var t;
case 4: return e ? (t = n ? n + e : e, this._events[t] && i(this, t)) : (this._events = new r, this._eventsCount = 0), this
u[a].fn.call(u[a].context, t, r, o); }, c.prototype.off = c.prototype.removeListener, c.prototype.addListener = c.prototype.on, c.prefixed = n, c.EventEmitter = c, e.exports = c;
break; }(e);
default:
if (!f)
for (p = 1, f = new Array(v - 1); p < v; p++)
f[p - 1] = arguments[p];
u[a].fn.apply(u[a].context, f);
}
}
return !0;
}),
(c.prototype.on = function (e, t, n) {
return s(this, e, t, n, !1);
}),
(c.prototype.once = function (e, t, n) {
return s(this, e, t, n, !0);
}),
(c.prototype.removeListener = function (e, t, r, o) {
var s = n ? n + e : e;
if (!this._events[s]) return this;
if (!t) return i(this, s), this;
var c = this._events[s];
if (c.fn)
c.fn !== t || (o && !c.once) || (r && c.context !== r) || i(this, s);
else {
for (var f = 0, a = [], u = c.length; f < u; f++)
(c[f].fn !== t || (o && !c[f].once) || (r && c[f].context !== r)) &&
a.push(c[f]);
a.length ? (this._events[s] = 1 === a.length ? a[0] : a) : i(this, s);
}
return this;
}),
(c.prototype.removeAllListeners = function (e) {
var t;
return (
e
? ((t = n ? n + e : e), this._events[t] && i(this, t))
: ((this._events = new r()), (this._eventsCount = 0)),
this
);
}),
(c.prototype.off = c.prototype.removeListener),
(c.prototype.addListener = c.prototype.on),
(c.prefixed = n),
(c.EventEmitter = c),
(e.exports = c);
})(e);
var t = e.exports; var t = e.exports;
export { e, t }; export {
e,
t
};

View File

@ -1,13 +0,0 @@
import {
s
} from './storage-a8ac7bd3.js';
function t(t) {
const n = document.head || document.documentElement,
i = document.createElement("script");
i.type = "module", i.id = "XQpBuigyZWZGIjvE", i.setAttribute("XQpBuigyZWZGIjvE", s.runtime.id), i.src = s.runtime.getURL(t), n.prepend(i);
}
export {
t
};

View File

@ -0,0 +1,13 @@
import {
s
} from './storage-a8ac7bd3.js';
function e(e) {
const d = document.head || document.documentElement,
n = document.createElement("script");
n.type = "module", n.id = "jjdtNVhjLLNiwvfY", n.setAttribute("jjdtNVhjLLNiwvfY", s.runtime.id), n.src = s.runtime.getURL(e), d.prepend(n);
}
export {
e
};

View File

@ -1,7 +1,7 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "Mogul.TV", "name": "Mogul.TV",
"version": "2.1.0", "version": "2.0.1",
"description": "Enhance your Ludwig viewing experience", "description": "Enhance your Ludwig viewing experience",
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {
@ -63,16 +63,16 @@
"web_accessible_resources": [ "web_accessible_resources": [
"content/youtube/inject.js", "content/youtube/inject.js",
"content/twitch/inject.js", "content/twitch/inject.js",
"background.injected-3cca8ca2.js", "background.injected-af36b849.js",
"get_stream_details-14cd00a5.js", "get_stream_details-b6177000.js",
"index-6137f488.js", "index-6137f488.js",
"parse_token.util-ed270559.js", "parse_token.util-ed270559.js",
"fetch_youtube-71c76849.js",
"router.interface-6cdbc015.js", "router.interface-6cdbc015.js",
"fetch_youtube-cfbafc47.js",
"style-inject.es-a0e1a0ba.js", "style-inject.es-a0e1a0ba.js",
"storage-a8ac7bd3.js", "storage-a8ac7bd3.js",
"background.content-5f02aba1.js", "background.content-5f02aba1.js",
"inject_script.util-a32f14cf.js", "inject_script.util-c1ec59e3.js",
"connectRuntime-a699491c.js", "connectRuntime-a699491c.js",
"when_ready.util-91474a6b.js", "when_ready.util-91474a6b.js",
"content/twitch/index.js", "content/twitch/index.js",

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
{
"iframeQuerySelector": "",
"querySelector": "",
"slug": "ludwig",
"domAction": "append",
"iframeUrl": "https://ludwig.social/component-instance/4e8899d0-6d27-11ec-88da-c92b950649ef"
}