Compare commits

..

4 Commits

Author SHA1 Message Date
vel c66f2440aa
more documentation 2022-01-30 20:18:41 -08:00
vel 4e6d5f4c6b
documentation 2022-01-30 18:25:54 -08:00
vel 11b73b13ea
beautify everything 2022-01-30 15:55:15 -08:00
vel 0a56c12270
add v2.1.0 2022-01-30 15:06:29 -08:00
23 changed files with 5908 additions and 4979 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"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: QyOWplGk05hY8yqOckI5ow3flts= SHA1-Digest: 8r4ge1MUkevIu5TBkndNSqufFpQ=
SHA256-Digest: YsavbsFOHi+AXVSbguQu0Tv60yoFhK9W3mW++ablOII= SHA256-Digest: fs4jGOByTYlWclNPpZVNV+wBFaXT6bWERzbjCnnoPe4=
Name: background.js Name: background.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: otZGFtDhcnbfdUJOCjW9i1NYPO0= SHA1-Digest: XqO63B4wrLb+qeRrur//MuXmTDg=
SHA256-Digest: mgVRfmNzMoxvuLndSlKK4AkCWDabpbekleOV++9cWtU= SHA256-Digest: MBwWJFWEitL5u4MiFpXe9wLvbu0v7biLBR5Wisap2RI=
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-af36b849.js Name: background.injected-3cca8ca2.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: UF0lgn7oKe72Bjg/lBEwzH4Umis= SHA1-Digest: Jkar4HKfUBl6hXuMilzSMoCT0Aw=
SHA256-Digest: NTFIqjrprPiv/JKI7ppnvr3q1Ibt8C/IGbLwkr3nHNk= SHA256-Digest: jgpG5gD1Z25xRR6P5j0WTobFMtp6RcO8WDHHfIp6itk=
Name: get_stream_details-b6177000.js Name: get_stream_details-14cd00a5.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: yCTRLEgpVeUuVBx6nRlIZGc/FkA= SHA1-Digest: iAnKOLOb4udJzWaXY204OcbQYSc=
SHA256-Digest: QzA+2ffC9lOLR9vXjdJYGXg12fQY0Fo5ga6Na4muGqU= SHA256-Digest: jJzqqz7+uuyLnGe0wOWx+0AHgeSmQLAiIhKUALSiL2M=
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-c1ec59e3.js Name: inject_script.util-a32f14cf.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: A1nesjjyxjUtFgzMB/LrqVTxYvA= SHA1-Digest: 8HCRlK+lL8ZtNwyF7mNi5KuuuzM=
SHA256-Digest: v9JV86okMb2y8UCyST10ZJmZi28egw6Fpua+HOdpAKU= SHA256-Digest: nfDXmVeKgo/UF0V4X6ISb/OUvw68r2Pf7OCDffa40sg=
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: X/+QqwkoQ/2LSAmw6IojRy+ZFEA= SHA1-Digest: whRlFIsgAHUsxXG+LklCWr4h5xY=
SHA256-Digest: ELssVW8zEux25qpRliKg44b0YVg8g8MKJ+rSvVpZnQM= SHA256-Digest: GCERazX/02M0DPZ0xM6LZlOPqojqYzvKRklDqKea0rQ=
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: Ov5ue5JIapXyBOzbveEVoBNFPXk= SHA1-Digest: pByrb3KBCtpW0DLo6/VPDpMRLQY=
SHA256-Digest: FOL1i7Z8U1fU66AAbV3F2sSWGlMgSWfSNUAQdP8CgnM= SHA256-Digest: TqqIA4FQmVJvtMDGhDnNlVKSLVtGdLDIIl1IqwlH75M=
Name: content/youtube/index.js Name: content/youtube/index.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: FzEoDMTpvO6RgnXhR7dbrHb9EuU= SHA1-Digest: sMJtFK28CDraOhO5E5Xa/tDUlQ0=
SHA256-Digest: uDoKZjRVQJc+v2MjqjIFM5sVrXufOPcRD+BRlXk2Wxg= SHA256-Digest: 0EfiLGj1p2s6EiWdj6A18qNR3KsrusoapIpFw90xb0k=
Name: content/twitch/inject.js Name: content/twitch/inject.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 7NMc9FYcdiJ+XH27GauS1qIRsac= SHA1-Digest: 3J65UKR/H09RbyTokYymXyxMj/k=
SHA256-Digest: SHAgW6ZzT6DnrZMj+fBld3X/GcvpeydsH+zP+JgK+jw= SHA256-Digest: dnGWTJZWut83QwepmncuWjln0/clpDRmUskguhI+Q+Q=
Name: content/twitch/index.js Name: content/twitch/index.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 0OlsTi3u80Ji/nlfE/jDs/H3BKQ= SHA1-Digest: HqiBCgezv+LUYn4Umiw4bWs+ePs=
SHA256-Digest: 1UDKMJwQ7k23j1hOxDrq5Mbt3uiLKSfmLQ0lHXDPe54= SHA256-Digest: EcqpAHaExr3EikKXkO3w4zw5zKmPu/w8efSbxKPIp5k=
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: QyOWplGk05hY8yqOckI5ow3flts= SHA1-Digest: 8r4ge1MUkevIu5TBkndNSqufFpQ=
SHA256-Digest: YsavbsFOHi+AXVSbguQu0Tv60yoFhK9W3mW++ablOII= SHA256-Digest: fs4jGOByTYlWclNPpZVNV+wBFaXT6bWERzbjCnnoPe4=
Name: background.js Name: background.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: otZGFtDhcnbfdUJOCjW9i1NYPO0= SHA1-Digest: XqO63B4wrLb+qeRrur//MuXmTDg=
SHA256-Digest: mgVRfmNzMoxvuLndSlKK4AkCWDabpbekleOV++9cWtU= SHA256-Digest: MBwWJFWEitL5u4MiFpXe9wLvbu0v7biLBR5Wisap2RI=
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-af36b849.js Name: background.injected-3cca8ca2.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: UF0lgn7oKe72Bjg/lBEwzH4Umis= SHA1-Digest: Jkar4HKfUBl6hXuMilzSMoCT0Aw=
SHA256-Digest: NTFIqjrprPiv/JKI7ppnvr3q1Ibt8C/IGbLwkr3nHNk= SHA256-Digest: jgpG5gD1Z25xRR6P5j0WTobFMtp6RcO8WDHHfIp6itk=
Name: get_stream_details-b6177000.js Name: get_stream_details-14cd00a5.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: yCTRLEgpVeUuVBx6nRlIZGc/FkA= SHA1-Digest: iAnKOLOb4udJzWaXY204OcbQYSc=
SHA256-Digest: QzA+2ffC9lOLR9vXjdJYGXg12fQY0Fo5ga6Na4muGqU= SHA256-Digest: jJzqqz7+uuyLnGe0wOWx+0AHgeSmQLAiIhKUALSiL2M=
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-c1ec59e3.js Name: inject_script.util-a32f14cf.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: A1nesjjyxjUtFgzMB/LrqVTxYvA= SHA1-Digest: 8HCRlK+lL8ZtNwyF7mNi5KuuuzM=
SHA256-Digest: v9JV86okMb2y8UCyST10ZJmZi28egw6Fpua+HOdpAKU= SHA256-Digest: nfDXmVeKgo/UF0V4X6ISb/OUvw68r2Pf7OCDffa40sg=
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: X/+QqwkoQ/2LSAmw6IojRy+ZFEA= SHA1-Digest: whRlFIsgAHUsxXG+LklCWr4h5xY=
SHA256-Digest: ELssVW8zEux25qpRliKg44b0YVg8g8MKJ+rSvVpZnQM= SHA256-Digest: GCERazX/02M0DPZ0xM6LZlOPqojqYzvKRklDqKea0rQ=
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: Ov5ue5JIapXyBOzbveEVoBNFPXk= SHA1-Digest: pByrb3KBCtpW0DLo6/VPDpMRLQY=
SHA256-Digest: FOL1i7Z8U1fU66AAbV3F2sSWGlMgSWfSNUAQdP8CgnM= SHA256-Digest: TqqIA4FQmVJvtMDGhDnNlVKSLVtGdLDIIl1IqwlH75M=
Name: content/youtube/index.js Name: content/youtube/index.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: FzEoDMTpvO6RgnXhR7dbrHb9EuU= SHA1-Digest: sMJtFK28CDraOhO5E5Xa/tDUlQ0=
SHA256-Digest: uDoKZjRVQJc+v2MjqjIFM5sVrXufOPcRD+BRlXk2Wxg= SHA256-Digest: 0EfiLGj1p2s6EiWdj6A18qNR3KsrusoapIpFw90xb0k=
Name: content/twitch/inject.js Name: content/twitch/inject.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 7NMc9FYcdiJ+XH27GauS1qIRsac= SHA1-Digest: 3J65UKR/H09RbyTokYymXyxMj/k=
SHA256-Digest: SHAgW6ZzT6DnrZMj+fBld3X/GcvpeydsH+zP+JgK+jw= SHA256-Digest: dnGWTJZWut83QwepmncuWjln0/clpDRmUskguhI+Q+Q=
Name: content/twitch/index.js Name: content/twitch/index.js
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 0OlsTi3u80Ji/nlfE/jDs/H3BKQ= SHA1-Digest: HqiBCgezv+LUYn4Umiw4bWs+ePs=
SHA256-Digest: 1UDKMJwQ7k23j1hOxDrq5Mbt3uiLKSfmLQ0lHXDPe54= SHA256-Digest: EcqpAHaExr3EikKXkO3w4zw5zKmPu/w8efSbxKPIp5k=
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: JbBDgY4Auec9tEuvS6VrbtqtU88= SHA1-Digest: BYmOAwTNBgO8Wxycx1Kf8NZscOU=
SHA256-Digest: TnnqxR++CyBRAEwdlIwvhgX7w7TJqfoi16AKWXm6nFM= SHA256-Digest: Zi0CEgOSQTn5wZ0RfTnvHcb1xxKi3JWXHh8Vdb5TzIY=
Name: META-INF/cose.sig Name: META-INF/cose.sig
Digest-Algorithms: SHA1 SHA256 Digest-Algorithms: SHA1 SHA256
SHA1-Digest: aq3V7SWNxTjUOvac4nR0ASzSuCo= SHA1-Digest: WVA3bcRE0X2r9BxtYMVyizWvBdo=
SHA256-Digest: NjaNWpbF0miRPZBdCYp2gIlbe0x6ekUrgeZX3GGkUK4= SHA256-Digest: r+7Plk+kPNkGrfm3iSQ3YrzmK0RMrInUx2arhNlpwx0=

Binary file not shown.

View File

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

View File

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

View File

@ -0,0 +1,69 @@
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

@ -1,52 +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("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,246 +1,314 @@
import { import { d as dt } from "./parse_token.util-ed270559.js";
d as dt import { n } from "./router.interface-6cdbc015.js";
} from './parse_token.util-ed270559.js'; import { e } from "./fetch_youtube-cfbafc47.js";
import { import { s as s$1, m } from "./storage-a8ac7bd3.js";
e
} from './fetch_youtube-71c76849.js';
import {
n
} from './router.interface-6cdbc015.js';
import {
s,
m
} from './storage-a8ac7bd3.js';
class o extends Error { class s 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 = {}, a) => ({ const r = (t, e = {}, n) => ({
body: e, body: e,
meta: { meta: {
isSuccess: !1, isSuccess: !1,
code: t, code: t,
nonce: a nonce: n,
} },
}); });
let i; let i;
const c = t => s.cookies.getAll({ const c = (t) =>
url: t s$1.cookies
}).then((t => t.filter((t => !t.name.startsWith("ST-"))).map((t => [t.name, t.value])))).then(Object.fromEntries), .getAll({
u = { url: t,
"@me": async () => { })
const t = await m.auth.get("token"); .then((t) =>
return dt(t) t.filter((t) => !t.name.startsWith("ST-")).map((t) => [t.name, t.value])
)
.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 () => { }),
const t = await m.auth.get("token"); await m.auth.remove("token");
await fetch("https://v2.mogultv.org/auth/youtube", { },
method: "DELETE", login: async (t) => {
headers: { const n = await c(t.href),
Authorization: `Bearer ${t}` a = await fetch("https://v2.mogultv.org/auth/youtube", {
} method: "POST",
}), await m.auth.remove("token"); body: JSON.stringify(
}, Object.assign(Object.assign({}, t), {
login: async t => { cookies: n,
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;
return o const { jwt: o } = await a.json();
}, h = { return await m.auth.set("token", o), o;
youtube: {
"get-stream": async () => {
const t = await m.cache.get("get-stream");
let a;
if (t && t.expiresAt > Date.now()) a = t.value;
else {
const t = Date.now() + 6e4;
a = 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(),
a = /(?:window\s*\[\s*["']ytInitialData["']\s*\]|ytInitialData)\s*=\s*({.+?})\s*;/.exec(e);
if (a) {
const t = JSON.parse(a[1]),
e = t.currentVideoEndpoint.watchEndpoint.videoId,
s = t.contents.twoColumnWatchNextResults.results.results.contents[0].videoPrimaryInfoRenderer,
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;
return {
title: s.title.runs[0].text,
viewersCount: parseInt(o.replace(/,/g, "")),
previewImageURL: `https://i.ytimg.com/vi/${e}/mqdefault.jpg`,
profileImageURL: n
}
}
} catch (t) {
console.warn(t);
}
return null
}(), await m.cache.set("get-stream", {
expiresAt: t,
value: a
});
}
return a
},
"get-user": async t => {
const e$1 = await c(t.href),
a = await e(Object.assign(Object.assign({}, t), {
cookies: e$1
}));
if (!a.success) throw new o(a.code, a.message);
return a.data
}
}, },
gateway: { link: async (t) => {
users: l("/gateway/users"), const n = await m.auth.get("token"),
emotes: l("/gateway/emotes"), o = await fetch(`https://v2.mogultv.org/link/${t}`, {
badges: l("/gateway/badges"), method: "GET",
"set-settings": async t => { headers: {
const a = await m.auth.get("token"), Authorization: `Bearer ${n}`,
n = await fetch("https://v2.mogultv.org/gateway/settings", { },
method: "PUT", });
headers: { if (200 !== o.status) return;
Authorization: `Bearer ${a}` const s = await o.text();
}, await chrome.cookies.set({
body: JSON.stringify(t) url: "https://v2.mogultv.org",
}), name: "Authorization",
{ value: n,
jwt: o httpOnly: !0,
} = await n.json(); path: `/link/${t}/callback`,
return m.auth.set("token", o), dt(o) expirationDate: Math.floor(Date.now() / 1e3) + 3600,
} }),
await chrome.windows.create({
url: s,
focused: !0,
type: "popup",
width: 850,
height: 800,
});
const r = await new Promise((t) => {
i = t;
});
return m.auth.set("token", r), dt(r);
}, },
auth: u, "finish-link": async (t, e) => {
extension: { var a, o;
popup: () => s.action.openPopup(), (null === (a = e.sender.tab) || void 0 === a ? void 0 : a.id) &&
"open-tab": async t => { s$1.tabs.remove(
await s.tabs.create({ null === (o = e.sender.tab) || void 0 === o ? void 0 : o.id
url: t ),
}); null == i || i(t);
} },
} "disconnect-link": async (t) => {
}, d = async (e, a) => { const n = await m.auth.get("token"),
var s; o = await fetch(`https://v2.mogultv.org/link/${t}`, {
const { method: "DELETE",
path: n$1, headers: {
body: o Authorization: `Bearer ${n}`,
} = e; },
if (!n$1) return; });
e.meta ? e.meta.sender = a : e.meta = { if (200 !== o.status) return;
sender: a, const { jwt: s } = await o.json();
isPort: !1 return await m.auth.set("token", s), dt(s);
}, e.meta.isPort || (e.meta.isPort = !1); },
const i = t => {}, };
c = n$1.split("/").filter(Boolean), const l = (t) => async () => {
u = c[0]; var n, a;
if (!(u in h)) { const o = await m.cache.get(t);
return r(n.NotFound, void 0, e.nonce) let s;
} if (o && o.expiresAt > Date.now()) s = o.value;
const l = h[u][c.slice(1).join("/")]; else {
if (!l) { const o = await fetch("https://v2.mogultv.org" + t),
return r(n.NotFound, void 0, e.nonce) r = Number(o.headers.get("age")),
} i =
try { Number(
const a = ((e, a) => ({ (null ===
body: e, (a =
meta: { null === (n = o.headers.get("cache-control")) || void 0 === n
isSuccess: !0, ? void 0
code: n.Success, : n.match(/max-age=(\d+)/)) || void 0 === a
nonce: a ? void 0
} : a[1]) || 300
}))(await l(o, e.meta), e.nonce); ) - r,
return i(a), a c = Date.now() + 1e3 * i;
} catch (a) { (s = await o.json()),
const n$1 = a; await m.cache.set(t, {
return r(null !== (s = n$1.code) && void 0 !== s ? s : n.Unknown, { expiresAt: c,
message: n$1.message value: s,
}, e.nonce) });
} }
return s;
}; };
s.runtime.onConnect.addListener((t => { async function d(t, e) {
const e = t.sender; const n = {
e && t.onMessage.addListener((async a => { sourceType: t,
a.meta = { sourceId: e,
isPort: !0 };
}; try {
const s = await d(a, e); const t = await (async function (t, e, n, { throwIfErrors: a } = {}) {
t.postMessage(s); var o;
})); const s = await fetch(t, {
})), s.runtime.onMessage.addListener(d); 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) {
console.warn(t);
}
return null;
})()),
await m.cache.set("get-stream", {
expiresAt: t,
value: n,
});
}
return n;
},
"get-user": async (t) => {
const e$1 = await c(t.href),
n = await e(
Object.assign(Object.assign({}, t), {
cookies: e$1,
})
);
if (!n.success) throw new s(n.code, n.message);
return n.data;
},
},
gateway: {
users: l("/gateway/users"),
emotes: l("/gateway/emotes"),
badges: l("/gateway/badges"),
"set-settings": async (t) => {
const n = await m.auth.get("token"),
o = await fetch("https://v2.mogultv.org/gateway/settings", {
method: "PUT",
headers: {
Authorization: `Bearer ${n}`,
},
body: JSON.stringify(t),
}),
{ jwt: s } = await o.json();
return m.auth.set("token", s), dt(s);
},
},
auth: u,
extension: {
popup: () => s$1.action.openPopup(),
"open-tab": async (t) => {
await s$1.tabs.create({
url: t,
});
},
},
spore: {
"fetch-extension-mappings": async (t) => await d("youtube", t),
},
};
const w = async (e, n$1) => {
var a;
const { path: o, body: s } = e;
if (!o) return;
e.meta
? (e.meta.sender = n$1)
: (e.meta = {
sender: n$1,
isPort: !1,
}),
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 {
e t
} from '../../inject_script.util-c1ec59e3.js'; } from '../../inject_script.util-a32f14cf.js';
new o, e("content/twitch/inject.js"); new o, t("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-af36b849.js'; } from '../../background.injected-3cca8ca2.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$3 e as e$2
} from '../../get_stream_details-b6177000.js'; } from '../../get_stream_details-14cd00a5.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 {
e as e$2 t
} from '../../inject_script.util-c1ec59e3.js'; } from '../../inject_script.util-a32f14cf.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 c() { async function d() {
const g = await d(); const g = await c();
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 c() {
})); }));
} }
function d() { function c() {
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(d())), 1e3); setTimeout((() => g(c())), 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$3(); I = e$2();
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, e$2("content/youtube/inject.js"), g ? a() : c(); new o$1, t("content/youtube/inject.js"), g ? a() : d();
})); }));

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,
c = Math.floor(Date.now() / 1e3), a = Math.floor(Date.now() / 1e3),
a = await async function(e) { s = 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("")
}(`${c} ${o} ${n}`), s = { }(`${a} ${o} ${n}`), c = {
"x-origin": n, "x-origin": n,
authorization: `SAPISIDHASH ${c}_${a}`, authorization: `SAPISIDHASH ${a}_${s}`,
"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 && (s["x-goog-pageid"] = t.pageId); t.pageId && (c["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: s, headers: c,
body: JSON.stringify({ body: JSON.stringify({
context: t.context context: t.context
}) })
@ -35,11 +35,13 @@ 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("QXZRwEzaeHNfDqtD"); const n = new URLSearchParams(window.location.hash.substring(1)).get("rVuDVKjClhIQSUGR");
if (n) try { if (n) try {
return JSON.parse(n) return JSON.parse(n)
} catch (n) { } catch (n) {

View File

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

View File

@ -0,0 +1,13 @@
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

@ -1,13 +0,0 @@
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.0.1", "version": "2.1.0",
"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-af36b849.js", "background.injected-3cca8ca2.js",
"get_stream_details-b6177000.js", "get_stream_details-14cd00a5.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-c1ec59e3.js", "inject_script.util-a32f14cf.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

7
sporeinjection.json Normal file
View File

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