Compare commits

..

2 Commits
main ... 3.0.1

Author SHA1 Message Date
vel 3c48cba6d6
fixed? 2022-03-03 19:05:03 -08:00
vel 751245a2f0
added 3.0.1 2022-03-03 18:59:14 -08:00
26 changed files with 6090 additions and 5694 deletions

View File

@ -1,142 +0,0 @@
Manifest-Version: 1.0
Name: manifest.json
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: QyOWplGk05hY8yqOckI5ow3flts=
SHA256-Digest: YsavbsFOHi+AXVSbguQu0Tv60yoFhK9W3mW++ablOII=
Name: background.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: otZGFtDhcnbfdUJOCjW9i1NYPO0=
SHA256-Digest: mgVRfmNzMoxvuLndSlKK4AkCWDabpbekleOV++9cWtU=
Name: index-6137f488.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: rNamLTYc/X4gd/dLBlk300AQOW8=
SHA256-Digest: S33prVTiy5xonbBTGTEKPY1v+Lb84anybWbye+zq6wE=
Name: background.injected-af36b849.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: UF0lgn7oKe72Bjg/lBEwzH4Umis=
SHA256-Digest: NTFIqjrprPiv/JKI7ppnvr3q1Ibt8C/IGbLwkr3nHNk=
Name: get_stream_details-b6177000.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: yCTRLEgpVeUuVBx6nRlIZGc/FkA=
SHA256-Digest: QzA+2ffC9lOLR9vXjdJYGXg12fQY0Fo5ga6Na4muGqU=
Name: parse_token.util-ed270559.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: IBgALOyVpV5c2qndWHw3xIwYD8o=
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
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: W9ch3UrWE93U87O7CGQLo4Zn1O8=
SHA256-Digest: icJArSO2T+nG5wNcv9j54PPcb7/4hrTvQgkyxvoww74=
Name: style-inject.es-a0e1a0ba.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: syuFaCktG1wUUxfCChPrKvOC3Po=
SHA256-Digest: KVO81P8lHSZ+7NgTK9REh7A7CNjl/cZWUzBQSWLW8GQ=
Name: storage-a8ac7bd3.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 1fGdHT6DYLkzUYCSGdpONdCNjhA=
SHA256-Digest: wJ4DkoJ6fjrH7bUjQj26JLD8N87etKl9t8IFYffGfRg=
Name: connectRuntime-a699491c.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: LVD3EDxHZoyuVOD0Gx7nbbwyjmQ=
SHA256-Digest: AXPMWmaye4YgwkyD83k9SFZRtlk+iG8hfXSlk1pBJ5U=
Name: background.content-5f02aba1.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: pr0Fwt3L3YF+gW2/f1rMEthMD3c=
SHA256-Digest: QWplWRax1J1pkq64mM1eTeDg5Djv/CtiLJoIYlrZSI0=
Name: inject_script.util-c1ec59e3.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: A1nesjjyxjUtFgzMB/LrqVTxYvA=
SHA256-Digest: v9JV86okMb2y8UCyST10ZJmZi28egw6Fpua+HOdpAKU=
Name: when_ready.util-91474a6b.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: vGtvPLCiUbrZ0wSC14aVb5FkecQ=
SHA256-Digest: 9Cb+zjS00dSy+O5ABVzMB+qM/OAaHOzrkBfRtVGfw2o=
Name: popup/index.html
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: N1UM8u9cukLAr+I9D9YzWiqL4bM=
SHA256-Digest: 9CNJMH1v+j2WlTe+sIo78TZ6LuVLab2QIwGtrMhSFLw=
Name: popup/index.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: X/+QqwkoQ/2LSAmw6IojRy+ZFEA=
SHA256-Digest: ELssVW8zEux25qpRliKg44b0YVg8g8MKJ+rSvVpZnQM=
Name: assets/icon16.png
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 5fHxvDGOaVFjrooikbv1hD0zJ1o=
SHA256-Digest: fUCcukwVtnuEm0RLro1kBByeqg7y9ZtacV/EJOGab2w=
Name: assets/icon48.png
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: zKUR+hdJsV76zopW+ANvI6Ib91E=
SHA256-Digest: 3RNu1SPtiNbK9DlSeRuro+r8vQ3e1vsKAFMQs0x52N0=
Name: assets/icon128.png
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: tsWw4BHONlffMdl0Sm7UzLWYW/k=
SHA256-Digest: DQq7VbY0l32ewC/MJKwsPdqYPkgFkr4GywJe2TdkV9M=
Name: assets/background-c101863b.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: KHjGawagtvVDH7ef9CJ2qRQNcDI=
SHA256-Digest: QvnXfM33XTrJj0j8jRLvo3EvZPO0dFsitpnYG4kbTyM=
Name: assets/index-8c52b575.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: Un7dBvBb46qfc84r8NKcsv7452c=
SHA256-Digest: 4f5WbJ3/wfSqwD74LR9j34sJAkJ0MwSzpDYnDcpzG60=
Name: assets/index-b14d09b0.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: JsUIKULUiNrjUOqMBtDTLpU9Re4=
SHA256-Digest: 5TgWk/SxFjsHUhykKvheafN02qvQDgwKTIZ9+1R2UrY=
Name: assets/index-26a612d9.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: rUTqX3fuW2B6+zOTl6zBwkPo41s=
SHA256-Digest: SWQ0c104tRKLaUEOp9jtdl1bKuDYXQQNNXxQjdw6wJ4=
Name: content/youtube/inject.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: Ov5ue5JIapXyBOzbveEVoBNFPXk=
SHA256-Digest: FOL1i7Z8U1fU66AAbV3F2sSWGlMgSWfSNUAQdP8CgnM=
Name: content/youtube/index.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: FzEoDMTpvO6RgnXhR7dbrHb9EuU=
SHA256-Digest: uDoKZjRVQJc+v2MjqjIFM5sVrXufOPcRD+BRlXk2Wxg=
Name: content/twitch/inject.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 7NMc9FYcdiJ+XH27GauS1qIRsac=
SHA256-Digest: SHAgW6ZzT6DnrZMj+fBld3X/GcvpeydsH+zP+JgK+jw=
Name: content/twitch/index.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 0OlsTi3u80Ji/nlfE/jDs/H3BKQ=
SHA256-Digest: 1UDKMJwQ7k23j1hOxDrq5Mbt3uiLKSfmLQ0lHXDPe54=
Name: content/mogultv/index.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: SM+VJXBfLoE8CIUeV9asO1rzKd0=
SHA256-Digest: tAOufek6iJjCxZ5pmi9oNsTJl9EeiQppgYLc+9yq19s=

Binary file not shown.

View File

@ -1,152 +0,0 @@
Manifest-Version: 1.0
Name: manifest.json
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: QyOWplGk05hY8yqOckI5ow3flts=
SHA256-Digest: YsavbsFOHi+AXVSbguQu0Tv60yoFhK9W3mW++ablOII=
Name: background.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: otZGFtDhcnbfdUJOCjW9i1NYPO0=
SHA256-Digest: mgVRfmNzMoxvuLndSlKK4AkCWDabpbekleOV++9cWtU=
Name: index-6137f488.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: rNamLTYc/X4gd/dLBlk300AQOW8=
SHA256-Digest: S33prVTiy5xonbBTGTEKPY1v+Lb84anybWbye+zq6wE=
Name: background.injected-af36b849.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: UF0lgn7oKe72Bjg/lBEwzH4Umis=
SHA256-Digest: NTFIqjrprPiv/JKI7ppnvr3q1Ibt8C/IGbLwkr3nHNk=
Name: get_stream_details-b6177000.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: yCTRLEgpVeUuVBx6nRlIZGc/FkA=
SHA256-Digest: QzA+2ffC9lOLR9vXjdJYGXg12fQY0Fo5ga6Na4muGqU=
Name: parse_token.util-ed270559.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: IBgALOyVpV5c2qndWHw3xIwYD8o=
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
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: W9ch3UrWE93U87O7CGQLo4Zn1O8=
SHA256-Digest: icJArSO2T+nG5wNcv9j54PPcb7/4hrTvQgkyxvoww74=
Name: style-inject.es-a0e1a0ba.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: syuFaCktG1wUUxfCChPrKvOC3Po=
SHA256-Digest: KVO81P8lHSZ+7NgTK9REh7A7CNjl/cZWUzBQSWLW8GQ=
Name: storage-a8ac7bd3.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 1fGdHT6DYLkzUYCSGdpONdCNjhA=
SHA256-Digest: wJ4DkoJ6fjrH7bUjQj26JLD8N87etKl9t8IFYffGfRg=
Name: connectRuntime-a699491c.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: LVD3EDxHZoyuVOD0Gx7nbbwyjmQ=
SHA256-Digest: AXPMWmaye4YgwkyD83k9SFZRtlk+iG8hfXSlk1pBJ5U=
Name: background.content-5f02aba1.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: pr0Fwt3L3YF+gW2/f1rMEthMD3c=
SHA256-Digest: QWplWRax1J1pkq64mM1eTeDg5Djv/CtiLJoIYlrZSI0=
Name: inject_script.util-c1ec59e3.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: A1nesjjyxjUtFgzMB/LrqVTxYvA=
SHA256-Digest: v9JV86okMb2y8UCyST10ZJmZi28egw6Fpua+HOdpAKU=
Name: when_ready.util-91474a6b.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: vGtvPLCiUbrZ0wSC14aVb5FkecQ=
SHA256-Digest: 9Cb+zjS00dSy+O5ABVzMB+qM/OAaHOzrkBfRtVGfw2o=
Name: popup/index.html
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: N1UM8u9cukLAr+I9D9YzWiqL4bM=
SHA256-Digest: 9CNJMH1v+j2WlTe+sIo78TZ6LuVLab2QIwGtrMhSFLw=
Name: popup/index.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: X/+QqwkoQ/2LSAmw6IojRy+ZFEA=
SHA256-Digest: ELssVW8zEux25qpRliKg44b0YVg8g8MKJ+rSvVpZnQM=
Name: assets/icon16.png
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 5fHxvDGOaVFjrooikbv1hD0zJ1o=
SHA256-Digest: fUCcukwVtnuEm0RLro1kBByeqg7y9ZtacV/EJOGab2w=
Name: assets/icon48.png
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: zKUR+hdJsV76zopW+ANvI6Ib91E=
SHA256-Digest: 3RNu1SPtiNbK9DlSeRuro+r8vQ3e1vsKAFMQs0x52N0=
Name: assets/icon128.png
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: tsWw4BHONlffMdl0Sm7UzLWYW/k=
SHA256-Digest: DQq7VbY0l32ewC/MJKwsPdqYPkgFkr4GywJe2TdkV9M=
Name: assets/background-c101863b.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: KHjGawagtvVDH7ef9CJ2qRQNcDI=
SHA256-Digest: QvnXfM33XTrJj0j8jRLvo3EvZPO0dFsitpnYG4kbTyM=
Name: assets/index-8c52b575.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: Un7dBvBb46qfc84r8NKcsv7452c=
SHA256-Digest: 4f5WbJ3/wfSqwD74LR9j34sJAkJ0MwSzpDYnDcpzG60=
Name: assets/index-b14d09b0.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: JsUIKULUiNrjUOqMBtDTLpU9Re4=
SHA256-Digest: 5TgWk/SxFjsHUhykKvheafN02qvQDgwKTIZ9+1R2UrY=
Name: assets/index-26a612d9.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: rUTqX3fuW2B6+zOTl6zBwkPo41s=
SHA256-Digest: SWQ0c104tRKLaUEOp9jtdl1bKuDYXQQNNXxQjdw6wJ4=
Name: content/youtube/inject.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: Ov5ue5JIapXyBOzbveEVoBNFPXk=
SHA256-Digest: FOL1i7Z8U1fU66AAbV3F2sSWGlMgSWfSNUAQdP8CgnM=
Name: content/youtube/index.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: FzEoDMTpvO6RgnXhR7dbrHb9EuU=
SHA256-Digest: uDoKZjRVQJc+v2MjqjIFM5sVrXufOPcRD+BRlXk2Wxg=
Name: content/twitch/inject.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 7NMc9FYcdiJ+XH27GauS1qIRsac=
SHA256-Digest: SHAgW6ZzT6DnrZMj+fBld3X/GcvpeydsH+zP+JgK+jw=
Name: content/twitch/index.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: 0OlsTi3u80Ji/nlfE/jDs/H3BKQ=
SHA256-Digest: 1UDKMJwQ7k23j1hOxDrq5Mbt3uiLKSfmLQ0lHXDPe54=
Name: content/mogultv/index.js
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: SM+VJXBfLoE8CIUeV9asO1rzKd0=
SHA256-Digest: tAOufek6iJjCxZ5pmi9oNsTJl9EeiQppgYLc+9yq19s=
Name: META-INF/cose.manifest
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: JbBDgY4Auec9tEuvS6VrbtqtU88=
SHA256-Digest: TnnqxR++CyBRAEwdlIwvhgX7w7TJqfoi16AKWXm6nFM=
Name: META-INF/cose.sig
Digest-Algorithms: SHA1 SHA256
SHA1-Digest: aq3V7SWNxTjUOvac4nR0ASzSuCo=
SHA256-Digest: NjaNWpbF0miRPZBdCYp2gIlbe0x6ekUrgeZX3GGkUK4=

Binary file not shown.

View File

@ -1,4 +0,0 @@
Signature-Version: 1.0
SHA1-Digest-Manifest: JvgRKeFOOFxt5PuYl6SWkpcmiRw=
SHA256-Digest-Manifest: RxJHimH6MUnrcxmytp7w/FtE2hPteHedAiMOwT1Gzow=

View File

@ -1,154 +1,154 @@
(function() { (function () {
'use strict'; 'use strict';
function captureEvents(events) { function captureEvents(events) {
const captured = events.map(captureEvent); const captured = events.map(captureEvent);
return () => captured.forEach((t) => t()) return () => captured.forEach((t) => t())
function captureEvent(event) { function captureEvent(event) {
let isCapturePhase = true; let isCapturePhase = true;
// eslint-disable-next-line @typescript-eslint/ban-types // eslint-disable-next-line @typescript-eslint/ban-types
const callbacks = new Map(); const callbacks = new Map();
const eventArgs = new Set(); const eventArgs = new Set();
// This is the only listener for the native event // This is the only listener for the native event
event.addListener(handleEvent); event.addListener(handleEvent);
function handleEvent(...args) { function handleEvent(...args) {
if (isCapturePhase) { if (isCapturePhase) {
// This is before dynamic import completes // This is before dynamic import completes
eventArgs.add(args); eventArgs.add(args);
if (typeof args[2] === 'function') { if (typeof args[2] === 'function') {
// During capture phase all messages are async // During capture phase all messages are async
return true return true
} else { } else {
// Sync messages or some other event // Sync messages or some other event
return false return false
} }
} else { } else {
// The callbacks determine the listener return value // The callbacks determine the listener return value
return callListeners(...args) return callListeners(...args)
}
}
// Called when dynamic import is complete
// and when subsequent events fire
function callListeners(...args) {
let isAsyncCallback = false;
callbacks.forEach((options, cb) => {
// A callback error should not affect the other callbacks
try {
isAsyncCallback = cb(...args) || isAsyncCallback;
} catch (error) {
console.error(error);
}
});
if (!isAsyncCallback && typeof args[2] === 'function') {
// We made this an async message callback during capture phase
// when the function handleEvent returned true
// so we are responsible to call sendResponse
// If the callbacks are sync message callbacks
// the sendMessage callback on the other side
// resolves with no arguments (this is the same behavior)
args[2]();
}
// Support events after import is complete
return isAsyncCallback
}
// This function will trigger this Event with our stored args
function triggerEvents() {
// Fire each event for this Event
eventArgs.forEach((args) => {
callListeners(...args);
});
// Dynamic import is complete
isCapturePhase = false;
// Don't need these anymore
eventArgs.clear();
}
// All future listeners are handled by our code
event.addListener = function addListener(cb, ...options) {
callbacks.set(cb, options);
};
event.hasListeners = function hasListeners() {
return callbacks.size > 0
};
event.hasListener = function hasListener(cb) {
return callbacks.has(cb)
};
event.removeListener = function removeListener(cb) {
callbacks.delete(cb);
};
event.__isCapturedEvent = true;
return triggerEvents
} }
}
// Called when dynamic import is complete
// and when subsequent events fire
function callListeners(...args) {
let isAsyncCallback = false;
callbacks.forEach((options, cb) => {
// A callback error should not affect the other callbacks
try {
isAsyncCallback = cb(...args) || isAsyncCallback;
} catch (error) {
console.error(error);
}
});
if (!isAsyncCallback && typeof args[2] === 'function') {
// We made this an async message callback during capture phase
// when the function handleEvent returned true
// so we are responsible to call sendResponse
// If the callbacks are sync message callbacks
// the sendMessage callback on the other side
// resolves with no arguments (this is the same behavior)
args[2]();
}
// Support events after import is complete
return isAsyncCallback
}
// This function will trigger this Event with our stored args
function triggerEvents() {
// Fire each event for this Event
eventArgs.forEach((args) => {
callListeners(...args);
});
// Dynamic import is complete
isCapturePhase = false;
// Don't need these anymore
eventArgs.clear();
}
// All future listeners are handled by our code
event.addListener = function addListener(cb, ...options) {
callbacks.set(cb, options);
};
event.hasListeners = function hasListeners() {
return callbacks.size > 0
};
event.hasListener = function hasListener(cb) {
return callbacks.has(cb)
};
event.removeListener = function removeListener(cb) {
callbacks.delete(cb);
};
event.__isCapturedEvent = true;
return triggerEvents
} }
}
function delay(ms) { function delay(ms) {
return new Promise((resolve) => { return new Promise((resolve) => {
setTimeout(resolve, ms); setTimeout(resolve, ms);
}) })
} }
/** /**
* Get matches from an object of nested objects * Get matches from an object of nested objects
* *
* @export * @export
* @template T Type of matches * @template T Type of matches
* @param {*} object Parent object to search * @param {*} object Parent object to search
* @param {(x: any) => boolean} pred A predicate function that will receive each property value of an object * @param {(x: any) => boolean} pred A predicate function that will receive each property value of an object
* @param {string[]} excludeKeys Exclude a property if the key exactly matches * @param {string[]} excludeKeys Exclude a property if the key exactly matches
* @returns {T[]} The matched values from the parent object * @returns {T[]} The matched values from the parent object
*/ */
function getDeepMatches(object, pred, excludeKeys) { function getDeepMatches(object, pred, excludeKeys) {
const keys = typeof object === 'object' && object ? Object.keys(object) : []; const keys = typeof object === 'object' && object ? Object.keys(object) : [];
return keys.length ? return keys.length
keys ? keys
.filter((key) => !excludeKeys.includes(key)) .filter((key) => !excludeKeys.includes(key))
.reduce((r, key) => { .reduce((r, key) => {
const target = object[key]; const target = object[key];
if (target && pred(target)) { if (target && pred(target)) {
return [...r, target] return [...r, target]
} else { } else {
return [...r, ...getDeepMatches(target, pred, excludeKeys)] return [...r, ...getDeepMatches(target, pred, excludeKeys)]
} }
}, []) : }, [] )
[] : []
} }
const importPath = /*@__PURE__*/ JSON.parse('"../background.js"'); const importPath = /*@__PURE__*/JSON.parse('"../background.js"');
const delayLength = /*@__PURE__*/ JSON.parse('0'); const delayLength = /*@__PURE__*/JSON.parse('0');
const excludedPaths = /*@__PURE__*/ JSON.parse('["extension"]'); const excludedPaths = /*@__PURE__*/JSON.parse('["extension"]');
const events = getDeepMatches( const events = getDeepMatches(
chrome, chrome,
(x) => typeof x === 'object' && 'addListener' in x, (x) => typeof x === 'object' && 'addListener' in x,
// The webRequest API is not compatible with event pages // The webRequest API is not compatible with event pages
// TODO: this can be removed // TODO: this can be removed
// if we stop using this wrapper with "webRequest" permission // if we stop using this wrapper with "webRequest" permission
excludedPaths.concat(['webRequest']), excludedPaths.concat(['webRequest']),
); );
const triggerEvents = captureEvents(events); const triggerEvents = captureEvents(events);
import(importPath).then(async () => { import(importPath).then(async () => {
if (delayLength) await delay(delayLength); if (delayLength) await delay(delayLength);
triggerEvents(); triggerEvents();
}); });
}()); }());

View File

@ -0,0 +1,7 @@
import { t } from './index-2879cf47.js';
import { s, m } from './storage-6f9cf62e.js';
import { n } from './connectRuntime-a983a955.js';
class o extends t{constructor(){super(),this.fetch=async(t,e)=>{const s=Math.random().toString();return this.port.postMessage({nonce:s,path:t,body:e}),new Promise((t=>{const e=a=>{a.meta.nonce===s&&(this.port.onMessage.removeListener(e),t(a));};this.port.onMessage.addListener(e);}))},this.extensionId=s.runtime.id,this.port=this.connectToBackground(),this.port.onMessage.addListener(this.onMessage),window.addEventListener("message",(async t=>{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){case"fetch":n=await this.fetch(t.data.data[0],t.data.data[1]);break;case"storage.get":{const[e,a]=t.data.data.split(".");n=await m[e].get(a);break}case"storage.set":{const[e,a]=t.data.data[0].split(".");n=await m[e].set(a,t.data.data[1]);break}}window.postMessage({id:this.extensionId,nonce:t.data.nonce,type:"response",data:n});}));}connectToBackground(){return n()}async onMessage(t){window.postMessage(t);}}
export { o };

View File

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

View File

@ -1,12 +1,12 @@
import { import {
t t
} from './index-6137f488.js'; } from './index-2879cf47.js';
class e extends t { class e extends t {
constructor() { constructor() {
super(), this.fetch = async (t, e) => this.sendToContentScript("fetch", [t, e]), this.extensionId = function() { super(), this.fetch = async (t, e) => this.sendToContentScript("fetch", [t, e]), this.extensionId = function() {
var t; var t;
const e = null === (t = document.getElementById("jjdtNVhjLLNiwvfY")) || void 0 === t ? void 0 : t.getAttribute("jjdtNVhjLLNiwvfY"); const e = null === (t = document.getElementById("pKEWqxalXsGqbmDU")) || void 0 === t ? void 0 : t.getAttribute("pKEWqxalXsGqbmDU");
if (!e) throw new Error("Could not resolve extension ID from injected script"); if (!e) throw new Error("Could not resolve extension ID from injected script");
return e return e
}(), window.addEventListener("message", (t => { }(), window.addEventListener("message", (t => {
@ -22,10 +22,10 @@ class e extends t {
const n = { const n = {
value: e(await this.getStorage(t)) value: e(await this.getStorage(t))
}, },
o = window.setInterval((async () => { s = window.setInterval((async () => {
n.value = e(await this.getStorage(t)); n.value = e(await this.getStorage(t));
}), 1e3); }), 1e3);
return n.interval = o, n return n.interval = s, n
} }
async setStorage(t, e) { async setStorage(t, e) {
return this.sendToContentScript("storage.set", [t, e]) return this.sendToContentScript("storage.set", [t, e])
@ -38,9 +38,9 @@ class e extends t {
type: t, type: t,
data: e data: e
}), new Promise((t => { }), new Promise((t => {
const e = o => { const e = s => {
var s, a, i; var o, 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)); s.source === window && (null === (o = s.data) || void 0 === o ? void 0 : o.id) === this.extensionId && (null === (a = s.data) || void 0 === a ? void 0 : a.nonce) === n && "response" === (null === (i = s.data) || void 0 === i ? void 0 : i.type) && (t(s.data.data), window.removeEventListener("message", e));
}; };
window.addEventListener("message", e); window.addEventListener("message", e);
})) }))

View File

@ -1,246 +1,419 @@
import { import {
d as dt d as dt,
} from './parse_token.util-ed270559.js'; t
} from './parse_token.util-73818eef.js';
import { import {
e n,
} from './fetch_youtube-71c76849.js'; e,
c
} from './constants-27e12ede.js';
import { import {
n n as n$1
} from './router.interface-6cdbc015.js'; } from './router.interface-6cdbc015.js';
import { import {
s, s,
m m as m$1
} from './storage-a8ac7bd3.js'; } from './storage-6f9cf62e.js';
class o extends Error { class i 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 l = (t, e = {}, n) => ({
body: e, body: e,
meta: { meta: {
isSuccess: !1, isSuccess: !1,
code: t, code: t,
nonce: a nonce: n
} }
}); });
let i; let u;
const c = t => s.cookies.getAll({ const d = t => s.cookies.getAll({
url: t url: t
}).then((t => t.filter((t => !t.name.startsWith("ST-"))).map((t => [t.name, t.value])))).then(Object.fromEntries), }).then((t => t.filter((t => !t.name.startsWith("ST-"))).map((t => [t.name, t.value])))).then(Object.fromEntries),
u = { p = {
"@me": async () => { "@me": async () => {
const t = await m.auth.get("token"); const t = await m$1.auth.get("token2");
return dt(t) return dt(t)
}, },
token: async () => m$1.auth.get("token2"),
logout: async () => { logout: async () => {
const t = await m.auth.get("token"); const t = await m$1.auth.get("token2");
await fetch("https://v2.mogultv.org/auth/youtube", { await fetch("https://truffle-tv-source-test.truffle-tv.workers.dev/auth/youtube", {
method: "DELETE", method: "DELETE",
headers: { headers: {
Authorization: `Bearer ${t}` Authorization: `Bearer ${t}`
} }
}), await m.auth.remove("token"); }), await m$1.auth.remove("token2");
}, },
login: async t => { login: async t => {
const a = await c(t.href), const n = await d(t.href),
s = await fetch("https://v2.mogultv.org/auth/youtube", { o = await fetch("https://truffle-tv-source-test.truffle-tv.workers.dev/auth/youtube", {
method: "POST", method: "POST",
body: JSON.stringify(Object.assign(Object.assign({}, t), { body: JSON.stringify(Object.assign(Object.assign({}, t), {
cookies: a cookies: n
})) }))
}); });
if (200 !== s.status) return null; if (200 !== o.status) return null;
const { const {
jwt: n jwt: r
} = await s.json(); } = await o.json();
return await m.auth.set("token", n), n return await m$1.auth.set("token2", r), r
}, },
link: async t => { link: async t => {
const a = await m.auth.get("token"), const n = await m$1.auth.get("token2"),
n = await fetch(`https://v2.mogultv.org/link/${t}`, { r = await fetch(`https://truffle-tv-source-test.truffle-tv.workers.dev/link/${t}`, {
method: "GET", method: "GET",
headers: { headers: {
Authorization: `Bearer ${a}` Authorization: `Bearer ${n}`
} }
}); });
if (200 !== n.status) return; if (200 !== r.status) return;
const o = await n.text(); const s = await r.text();
await chrome.cookies.set({ await chrome.cookies.set({
url: "https://v2.mogultv.org", url: "https://truffle-tv-source-test.truffle-tv.workers.dev",
name: "Authorization", name: "Authorization",
value: a, value: n,
httpOnly: !0, httpOnly: !0,
path: `/link/${t}/callback`, path: `/link/${t}/callback`,
expirationDate: Math.floor(Date.now() / 1e3) + 3600 expirationDate: Math.floor(Date.now() / 1e3) + 3600
}), await chrome.windows.create({ }), await chrome.windows.create({
url: o, url: s,
focused: !0, focused: !0,
type: "popup", type: "popup",
width: 850, width: 850,
height: 800 height: 800
}); });
const r = await new Promise((t => { const a = await new Promise((t => {
i = t; u = t;
})); }));
return m.auth.set("token", r), dt(r) return m$1.auth.set("token2", a), dt(a)
}, },
"finish-link": async (t, e) => { "finish-link": async (t, e) => {
var s$1, n; var o, r;
(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); (null === (o = e.sender.tab) || void 0 === o ? void 0 : o.id) && s.tabs.remove(null === (r = e.sender.tab) || void 0 === r ? void 0 : r.id), null == u || u(t);
}, },
"disconnect-link": async t => { "disconnect-link": async t => {
const a = await m.auth.get("token"), const n = await m$1.auth.get("token2"),
n = await fetch(`https://v2.mogultv.org/link/${t}`, { r = await fetch(`https://truffle-tv-source-test.truffle-tv.workers.dev/link/${t}`, {
method: "DELETE", method: "DELETE",
headers: { headers: {
Authorization: `Bearer ${a}` Authorization: `Bearer ${n}`
} }
}); });
if (200 !== n.status) return; if (200 !== r.status) return;
const { const {
jwt: o jwt: s
} = await n.json(); } = await r.json();
return await m.auth.set("token", o), dt(o) return await m$1.auth.set("token2", s), dt(s)
} }
}; };
const l = t => async () => { const h = {
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
});
}
return o
}, h = {
youtube: {
"get-stream": async () => { "get-stream": async () => {
const t = await m.cache.get("get-stream"); const t = await m$1.cache.get("get-stream");
let a; let n;
if (t && t.expiresAt > Date.now()) a = t.value; if (t && t.expiresAt > Date.now()) n = t.value;
else { else {
const t = Date.now() + 6e4; const t = Date.now() + 6e4;
a = await async function() { n = await async function() {
try { try {
const t = await fetch("https://youtube.com/channel/UCrPseYLGpNygVi34QpGNqpA/live"); const t = await fetch("https://youtube.com/channel/UCrPseYLGpNygVi34QpGNqpA/live");
if (200 !== t.status) return null; if (200 !== t.status) return null;
const e = await t.text(), const e = await t.text(),
a = /(?:window\s*\[\s*["']ytInitialData["']\s*\]|ytInitialData)\s*=\s*({.+?})\s*;/.exec(e); n = /(?:window\s*\[\s*["']ytInitialData["']\s*\]|ytInitialData)\s*=\s*({.+?})\s*;/.exec(e);
if (a) { if (n) {
const t = JSON.parse(a[1]), const t = JSON.parse(n[1]),
e = t.currentVideoEndpoint.watchEndpoint.videoId, e = t.currentVideoEndpoint.watchEndpoint.videoId,
s = t.contents.twoColumnWatchNextResults.results.results.contents[0].videoPrimaryInfoRenderer, o = t.contents.twoColumnWatchNextResults.results.results.contents[0].videoPrimaryInfoRenderer,
n = t.contents.twoColumnWatchNextResults.results.results.contents[1].videoSecondaryInfoRenderer.owner.videoOwnerRenderer.thumbnail.thumbnails[0].url, r = 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; s = o.viewCount.videoViewCountRenderer.viewCount.runs.find((t => /^[0-9,]+$/.test(t.text))).text;
return { return {
title: s.title.runs[0].text, title: o.title.runs[0].text,
viewersCount: parseInt(o.replace(/,/g, "")), viewersCount: parseInt(s.replace(/,/g, "")),
previewImageURL: `https://i.ytimg.com/vi/${e}/mqdefault.jpg`, previewImageURL: `https://i.ytimg.com/vi/${e}/mqdefault.jpg`,
profileImageURL: n profileImageURL: r
} }
} }
} catch (t) { } catch (t) {
console.warn(t); console.warn(t);
} }
return null return null
}(), await m.cache.set("get-stream", { }(), await m$1.cache.set("get-stream", {
expiresAt: t, expiresAt: t,
value: a value: n
}); });
} }
return a return n
}, },
"get-user": async t => { "get-user": async t => {
const e$1 = await c(t.href), const e$1 = await d(t.href),
a = await e(Object.assign(Object.assign({}, t), { n = await e(Object.assign(Object.assign({}, t), {
cookies: e$1 cookies: e$1
})); }));
if (!a.success) throw new o(a.code, a.message); if (!n.success) throw new i(n.code, n.message);
return a.data return n.data
} }
}, },
gateway: { g = async (t, {
users: l("/gateway/users"), cacheExpirationMs: n = c.ONE_SECOND_MS,
emotes: l("/gateway/emotes"), cacheControlFallback: o = c.FIVE_MINUTE_SECONDS
badges: l("/gateway/badges"), } = {}) => {
var r, s;
const a = await m$1.cache.get(t);
let i;
if (a && a.expiresAt > Date.now()) i = a.value;
else {
const a = await fetch("https://truffle-tv-source-test.truffle-tv.workers.dev" + t),
c = Number(a.headers.get("age")),
l = Number((null === (s = null === (r = a.headers.get("cache-control")) || void 0 === r ? void 0 : r.match(/max-age=(\d+)/)) || void 0 === s ? void 0 : s[1]) || o) - c,
u = Date.now() + l * n;
i = await a.json(), await m$1.cache.set(t, {
expiresAt: u,
value: i
});
}
return i
}, f = (t, {
cacheExpirationMs: e = c.ONE_SECOND_MS,
cacheControlFallback: n = c.FIVE_MINUTE_SECONDS
} = {}) => async () => g(t, {
cacheControlFallback: n,
cacheExpirationMs: e
}), w = {
users: t => (console.log("fetching channelId"), g(`/gateway/users/c/${t}`)),
emotes: f("/gateway/emotes"),
badges: f("/gateway/badges"),
"set-settings": async t => { "set-settings": async t => {
const a = await m.auth.get("token"), console.log("updating settings", t);
n = await fetch("https://v2.mogultv.org/gateway/settings", { const n = await m$1.auth.get("token2"),
r = await fetch("https://truffle-tv-source-test.truffle-tv.workers.dev/gateway/settings", {
method: "PUT", method: "PUT",
headers: { headers: {
Authorization: `Bearer ${a}` Authorization: `Bearer ${n}`
}, },
body: JSON.stringify(t) body: JSON.stringify(t)
}), }),
{ {
jwt: o jwt: s
} = await n.json(); } = await r.json();
return m.auth.set("token", o), dt(o) return m$1.auth.set("token2", s), dt(s)
}
};
async function v(t, n, {
expireSeconds: o = c.ONE_MINUTE_SECONDS
} = {}) {
const r = await m$1.cache.get(t);
let s;
const a = (null == r ? void 0 : r.expiresAt) > Date.now();
if ((null == r ? void 0 : r.value) && a) s = r.value;
else {
s = await n();
const r = Date.now() + o * c.ONE_SECOND_MS;
await m$1.cache.set(t, {
expiresAt: r,
value: s
});
}
return s
}
function y(t$1, e) {
const n = function(t$1) {
if (null == t$1 ? void 0 : t$1.nodes) return t$1.nodes.map((t$1 => {
if (t$1) return function(t$1) {
return {
id: t$1.collectible.id,
name: t$1.collectible.slug,
ext: t$1.collectible.fileRel.fileObj.ext,
provider: t.Spore
}
}(t$1)
})).filter(m);
return []
}(null == e ? void 0 : e.ownedCollectibleConnection),
o = (s = null == e ? void 0 : e.ownedCollectibleConnection, null === (a = null == s ? void 0 : s.nodes) || void 0 === a ? void 0 : a.map((t => {
var e;
return null === (e = null == t ? void 0 : t.collectible) || void 0 === e ? void 0 : e.slug
})));
var s, a;
const c = function(t) {
var e;
return null === (e = null == t ? void 0 : t.nodes) || void 0 === e ? void 0 : e.map((t => {
var e;
return null === (e = null == t ? void 0 : t.powerup) || void 0 === e ? void 0 : e.slug
}))
}(null == e ? void 0 : e.activePowerupConnection);
return {
id: t$1,
emotes: o,
badges: c,
serializedEmotes: n
}
}
const m = t => !!t;
async function b(t, e, n, {
throwIfErrors: o
} = {}) {
var r;
const s = await fetch(t, {
method: "POST",
headers: {
Authorization: "Bearer pk_1K4r062GimOrw71jtDpzSAhii0lExREdcMZ2Fp5Y2uBjiZ1gS",
"Content-Type": "application/json"
},
body: JSON.stringify({
query: e,
variables: n
})
}),
a = await s.json();
if (o && (null === (r = a.data) || void 0 === r ? void 0 : r.errors)) throw new Error(`spore graphql error ${a.data.errors}`);
return a.data
}
const S = {
youtube: h,
gateway: w,
auth: p,
extension: {
popup: () => s.action.openPopup(),
"open-tab": async t => {
await s.tabs.create({
url: t
});
}
},
spore: {
"fetch-extension-mappings": async ({
channelId: t,
extensionVersion: e
}) => (console.log("fetching ext. mappigns", {
channelId: t,
extensionVersion: e
}), await async function(t, e, n) {
const o = {
sourceType: t,
sourceId: e,
extensionVersion: n
};
try {
const t = await b("https://zygote.spore.build/graphql", "query GetExtensionMappingConnection($sourceType: String, $sourceId: String, $extensionVersion: String) {\n\textensionMappingConnection(sourceType: $sourceType, sourceId: $sourceId, extensionVersion: $extensionVersion) {\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}", o);
return console.log("res", t), t.extensionMappingConnection.nodes
} catch (t) {
console.error(t);
}
}("youtube", t, e)),
"fetch-spore-user": async ({
connectionSourceId: t,
sporeOrgId: e,
preferCache: n = !0
} = {}) => {
const o = async () => {
const n = await async function(t, e) {
const n = {
orgId: e,
connectionSourceType: "youtube",
connectionSourceId: t,
collectibleType: "emote"
};
try {
return (await b("https://zygote.spore.build/graphql", "query CacheableOrgUserWithCollectiblesAndActivePowerups(\n $orgId: ID\n $connectionSourceType: String,\n $connectionSourceId: String,\n $collectibleType: String\n ) {\n orgUser(\n orgId: $orgId\n connectionSourceType: $connectionSourceType,\n connectionSourceId: $connectionSourceId\n\t\t\t) \n\t\t{\n\t\t\tid\n\t\t\tuserId\n\t\t\torgId\n\t\t\townedCollectibleConnection(collectibleType: $collectibleType) {\n\t\t\t\tnodes {\n\t\t\t\t\tuserId\n\t\t\t\t\tcollectible {\n\t\t\t\t\t\tid\n\t\t\t\t\t\tname\n\t\t\t\t\t\tslug\n\t\t\t\t\t\tfileRel {\n\t\t\t\t\t\t\tfileObj {\n\t\t\t\t\t\t\t\tsrc\n\t\t\t\t\t\t\t\text\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tactivePowerupConnection {\n\t\t\t\ttotalCount\n\t\t\t\tnodes {\n\t\t\t\t\tid\n\t\t\t\t\tuserId\n\t\t\t\t\tpowerup {\n\t\t\t\t\t\tid\n\t\t\t\t\t\tslug\n\t\t\t\t\t\tcomponentRels {\n\t\t\t\t\t\t\tprops\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n }\n\t}", n)).orgUser
} catch (t) {
console.error(t);
}
}(t, e);
return y(t, n)
};
if (n) {
const t = ((t, e) => `${t}:${e}`)(e, e);
return v(t, o, {
expireSeconds: 15
})
}
return o()
},
"fetch-youtube-channel": async t => {
const e = (t => `spore-org-yt-channel:${t}`)(t);
return v(e, (() => async function(t) {
const e = {
id: t
};
try {
return (await b("https://zygote.spore.build/graphql", "query YoutubeChannelById($id: String) {\n\tyoutubeChannel(id: $id) {\n\t\tid\n\t\tsporeOrgId\n\t\tchannelName\n\t\tisLive\t\n\t}\n}", e)).youtubeChannel
} catch (t) {
console.error(t);
}
}(t)), {
expireSeconds: 60
})
}
} }
}, },
auth: u, x = async (e, n$2) => {
extension: { var o;
popup: () => s.action.openPopup(), const {
"open-tab": async t => { path: r,
await s.tabs.create({ body: a
url: t } = e;
}); if (!r) return;
e.meta ? e.meta.sender = n$2 : e.meta = {
sender: n$2,
isPort: !1
}, e.meta.isPort || (e.meta.isPort = !1);
const c = (t => {
const e = Date.now();
return console.groupEnd(), console.groupCollapsed(`${t.meta.isPort?"P":""}-> %c${t.path}`, `color: ${n(t.path)}`), void 0 !== t.body && console.log("%cBody:", "color: hsl(0deg, 100%, 70%); font-weight: bold;", t.body), console.log("%cMeta:", "color: hsl(30deg, 100%, 70%); font-weight: bold;", t.meta), console.groupEnd(), n$1 => {
console.groupEnd(), console.groupCollapsed(`${t.meta.isPort?"P":""}<- %c${n$1.meta.code}%c ${t.path} %c${Date.now()-e}ms`, `background: ${n$1.meta.isSuccess?"#2ecc71":"#e74c3c"}; color: black; padding: 2px; border-radius: 2px;`, `color: ${n(t.path)}`, "color: white; font-weight: normal"), console.log("%cBody:", "color: hsl(0deg, 100%, 70%); font-weight: bold;", n$1.body), console.groupEnd();
}
})(e),
i = r.split("/").filter(Boolean),
u = i[0];
if (!(u in S)) {
const n = l(n$1.NotFound, void 0, e.nonce);
return c(n), n
} }
} const d = S[u][i.slice(1).join("/")];
}, d = async (e, a) => { if (!d) {
var s; const n = l(n$1.NotFound, void 0, e.nonce);
const { return c(n), n
path: n$1, }
body: o try {
} = e; const n = ((e, n) => ({
if (!n$1) return; body: e,
e.meta ? e.meta.sender = a : e.meta = { meta: {
sender: a, isSuccess: !0,
isPort: !1 code: n$1.Success,
}, e.meta.isPort || (e.meta.isPort = !1); nonce: n
const i = t => {}, }
c = n$1.split("/").filter(Boolean), }))(await d(a, e.meta), e.nonce);
u = c[0]; return c(n), n
if (!(u in h)) { } catch (n) {
return r(n.NotFound, void 0, e.nonce) const r = n;
} console.error("error in background", r);
const l = h[u][c.slice(1).join("/")]; const s = l(null !== (o = r.code) && void 0 !== o ? o : n$1.Unknown, {
if (!l) { message: r.message
return r(n.NotFound, void 0, e.nonce) }, e.nonce);
} return c(s), s
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)
}
};
s.runtime.onConnect.addListener((t => { s.runtime.onConnect.addListener((t => {
const e = t.sender; var e;
e && t.onMessage.addListener((async a => { const o = t.sender;
a.meta = { o && (console.log(`%cCONNECT:%c ${null===(e=t.sender)||void 0===e?void 0:e.url}`, "color: black; font-weight: bold; background: #2ecc71; padding: 2px; border-radius: 2px;", ""), t.onDisconnect.addListener((() => {
var e;
console.log(`%cDISCONNECT:%c ${null===(e=t.sender)||void 0===e?void 0:e.url}`, "color: black; font-weight: bold; background: #e74c3c; padding: 2px; border-radius: 2px;", "");
})), t.onMessage.addListener((async e => {
e.meta = {
isPort: !0 isPort: !0
}; };
const s = await d(a, e); const n = await x(e, o);
t.postMessage(s); t.postMessage(n);
})); })), s.tabs.onUpdated.addListener(((e, n, o) => {
})), s.runtime.onMessage.addListener(d); t.postMessage({
type: "tab:updated",
tabId: e,
changeInfo: n,
tab: o
});
})));
})), s.runtime.onMessage.addListener(x);

View File

@ -1,6 +1,6 @@
import { import {
s s
} from './storage-a8ac7bd3.js'; } from './storage-6f9cf62e.js';
const n = n => { const n = n => {
let s$1; let s$1;

View File

@ -1,19 +1,19 @@
async function e(e) { async function e(e) {
const t = await async function(e, t) { const t = await async function(e, t) {
const o = t.cookies.SAPISID || t.cookies["__Secure-3PAPISID"]; const n = t.cookies.SAPISID || t.cookies["__Secure-3PAPISID"];
if (!o) return { if (!n) return {
success: !1, success: !1,
code: 400, code: 400,
message: "Missing cookie" message: "Missing cookie"
}; };
const n = new URL(t.href).origin, const o = new URL(t.href).origin,
c = Math.floor(Date.now() / 1e3), a = Math.floor(Date.now() / 1e3),
a = await async function(e) { c = 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} ${n} ${o}`), s = {
"x-origin": n, "x-origin": o,
authorization: `SAPISIDHASH ${c}_${a}`, authorization: `SAPISIDHASH ${a}_${c}`,
"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(";")
}; };
@ -31,15 +31,17 @@ async function e(e) {
} }
}("/youtubei/v1/account/account_menu", e); }("/youtubei/v1/account/account_menu", e);
if (!t.success) return t; if (!t.success) return t;
const o = t.data; const n = t.data;
try { try {
const e = o.actions[0].openPopupAction.popup.multiPageMenuRenderer, const e = n.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, ""); o = e.sections[0].multiPageMenuSectionRenderer.items[0].compactLinkRenderer.navigationEndpoint.browseEndpoint.browseId.trim().replace(/\n/g, ""),
return /^UC.{22}$/.test(n) ? { a = n.responseContext.mainAppWebResponseContext.datasyncId.split("||")[0];
return /^UC.{22}$/.test(o) ? {
success: !0, success: !0,
data: { data: {
id: n, id: o,
googleUserId: a,
profile: t.accountPhoto.thumbnails[0].url, profile: t.accountPhoto.thumbnails[0].url,
username: t.accountName.simpleText username: t.accountName.simpleText
} }
@ -57,6 +59,36 @@ async function e(e) {
} }
} }
export { function t(e) {
e let t = 0;
if (0 === e.length) return 0;
for (let n = 0; n < e.length; n++) {
t = (t << 5) - t + e.charCodeAt(n), t |= 0;
}
return t
}
function n(e) {
return `hsl(${(t(e)%60+60)%60*6}deg, 100%, 70%)`
}
const o = ["#ff0000", "#009000", "#b22222", "#ff7f50", "#9acd32", "#ff4500", "#2e8b57", "#daa520", "#d2691e", "#5f9ea0", "#1e90ff", "#ff69b4", "#00ff7f", "#a244f9"];
function a(e) {
const n = t(e);
return o[(n % o.length + o.length) % o.length]
}
const c = {
ONE_SECOND_MS: 1e3,
ONE_MINUTE_SECONDS: 60,
ONE_MINUTE_MS: 6e4,
FIVE_MINUTE_MS: 3e4,
FIVE_MINUTE_SECONDS: 300,
DEFAULT_EXTENSION_MAPPING_IFRAME_STYLES: "\n\t\twidth: 0;\n\t\theight: 0;\n\t"
};
export {
a,
c,
e,
n
}; };

View File

@ -1,9 +1,9 @@
import '../../index-6137f488.js'; import '../../index-2879cf47.js';
import '../../storage-a8ac7bd3.js'; import '../../storage-6f9cf62e.js';
import '../../connectRuntime-a699491c.js'; import '../../connectRuntime-a983a955.js';
import { import {
o o
} from '../../background.content-5f02aba1.js'; } from '../../background.content-5d20fc40.js';
import { import {
e e
} from '../../when_ready.util-91474a6b.js'; } from '../../when_ready.util-91474a6b.js';

View File

@ -1,11 +1,200 @@
import '../../index-6137f488.js'; import '../../index-2879cf47.js';
import '../../storage-a8ac7bd3.js';
import '../../connectRuntime-a699491c.js';
import {
o
} from '../../background.content-5f02aba1.js';
import { import {
e e
} from '../../inject_script.util-c1ec59e3.js'; } from '../../background.injected-4f2074c6.js';
import {
s
} from '../../router.interface-6cdbc015.js';
new o, e("content/twitch/inject.js"); !async function(e) {
async function a(e) {
if (Array.isArray(e))
for (const t of e) await n(t);
return e
}
async function n(a) {
var n, i, r;
try {
switch (a.extensions.operationName) {
case "FollowingLive_CurrentUser": {
const n = a.data,
i = await e.fetch("/youtube/get-stream");
s(i) && i.body && (n.currentUser.followedLiveUsers.edges.push(function({
title: e,
viewersCount: t,
profileImageURL: a,
previewImageURL: n
}) {
return {
__typename: "FollowedLiveUserEdge",
cursor: "LTE=",
node: {
__typename: "User",
id: "40934651",
displayName: "ludwig",
login: "ludwig",
profileImageURL: a,
stream: {
broadcaster: {
id: "40934651",
primaryColorHex: "00FFE2",
__typename: "User",
channel: {
id: "40934651",
self: {
isAuthorized: !0,
__typename: "ChannelSelfEdge"
},
__typename: "Channel"
}
},
id: "-1",
previewImageURL: n,
game: {
id: "-1",
name: "YouTube",
displayName: "YouTube",
boxArtURL: "https://i.postimg.cc/NjQvCPh2/image.png",
__typename: "Game"
},
restriction: null,
tags: [],
title: e,
type: "live",
viewersCount: t,
__typename: "Stream"
}
}
}
}(i.body)), n.currentUser.followedLiveUsers.edges.sort(((e, t) => t.node.stream.viewersCount - e.node.stream.viewersCount)));
break
}
case "PersonalSections": {
const n = a.data.personalSections.find((e => "FOLLOWED_SECTION" === e.type));
if (n) {
const a = await e.fetch("/youtube/get-stream");
s(a) && a.body && (n.items.push(function({
title: e,
viewersCount: t,
profileImageURL: a,
previewImageURL: n
}) {
return {
trackingID: "1bb8ab4b-aed2-4f25-a750-c295d57e6a95",
promotionsCampaignID: "",
user: {
id: "40934651",
login: "ludwig",
displayName: "ludwig",
profileImageURL: a,
primaryColorHex: "00FFE2",
broadcastSettings: {
id: "40934651",
title: e,
__typename: "BroadcastSettings"
},
channel: {
id: "40934651",
creatorAnniversaries: {
id: "40934651",
isAnniversary: !1,
__typename: "CreatorAnniversaries"
},
__typename: "Channel"
},
__typename: "User"
},
label: "NONE",
content: {
id: "-1",
previewImageURL: n,
broadcaster: {
id: "40934651",
broadcastSettings: {
id: "40934651",
title: e,
__typename: "BroadcastSettings"
},
__typename: "User"
},
viewersCount: t,
self: {
canWatch: !0,
isRestricted: !1,
restrictionType: null,
__typename: "StreamSelfConnection"
},
game: {
id: "-1",
displayName: "YouTube",
name: "YouTube",
__typename: "Game"
},
type: "live",
__typename: "Stream"
},
__typename: "PersonalSectionChannel"
}
}(a.body)), n.items.sort(((e, t) => (t.content.viewersCount || 0) - (e.content.viewersCount || 0))));
}
break
}
case "StreamMetadata": {
const n = a.data;
if ("40934651" === n.user.id) {
const a = await e.fetch("/youtube/get-stream");
s(a) && a.body && (n.user.lastBroadcast.id = "-1", n.user.lastBroadcast.title = a.body.title, n.user.stream = {
id: "-1",
type: "live",
createdAt: (new Date).toJSON(),
viewersCount: a.body.viewersCount,
game: {
id: "-1",
name: "YouTube",
__typename: "Game"
},
__typename: "Stream"
});
}
break
}
default: {
const o = a.data;
if ("40934651" === (null === (n = o.user) || void 0 === n ? void 0 : n.id) && (null === (r = null === (i = o.user) || void 0 === i ? void 0 : i.lastBroadcast) || void 0 === r ? void 0 : r.title)) {
const a = await e.fetch("/youtube/get-stream");
s(a) && a.body && (o.user.lastBroadcast.title = a.body.title);
}
}
}
} catch (e) {}
}
const i = window.fetch.bind(window);
window.fetch = async function(e, t) {
const n = await i(e, t);
try {
let t;
if (t = "string" == typeof e ? e : e.url, !t.includes("gql.twitch.tv/gql")) return n;
const i = n.text.bind(n),
r = n.json.bind(n);
n.text = async function() {
const e = await i();
try {
const t = JSON.parse(e);
return await a(t), JSON.stringify(t)
} catch (t) {
return e
}
}, n.json = async function() {
const e = await r();
try {
return await a(e), e
} catch (t) {
return e
}
};
} catch (e) {
return n
}
return n
};
}(new e);

View File

@ -1,200 +1,5 @@
import '../../index-6137f488.js'; import '../../index-2879cf47.js';
import { import { e } from '../../background.injected-4f2074c6.js';
e import { s } from '../../router.interface-6cdbc015.js';
} from '../../background.injected-af36b849.js';
import {
s
} from '../../router.interface-6cdbc015.js';
!async function(e) { !async function(e){async function a(e){if(Array.isArray(e))for(const t of e)await n(t);return e}async function n(a){var n,i,r;try{switch(a.extensions.operationName){case"FollowingLive_CurrentUser":{const n=a.data,i=await e.fetch("/youtube/get-stream");s(i)&&i.body&&(n.currentUser.followedLiveUsers.edges.push(function({title:e,viewersCount:t,profileImageURL:a,previewImageURL:n}){return {__typename:"FollowedLiveUserEdge",cursor:"LTE=",node:{__typename:"User",id:"40934651",displayName:"ludwig",login:"ludwig",profileImageURL:a,stream:{broadcaster:{id:"40934651",primaryColorHex:"00FFE2",__typename:"User",channel:{id:"40934651",self:{isAuthorized:!0,__typename:"ChannelSelfEdge"},__typename:"Channel"}},id:"-1",previewImageURL:n,game:{id:"-1",name:"YouTube",displayName:"YouTube",boxArtURL:"https://i.postimg.cc/NjQvCPh2/image.png",__typename:"Game"},restriction:null,tags:[],title:e,type:"live",viewersCount:t,__typename:"Stream"}}}}(i.body)),n.currentUser.followedLiveUsers.edges.sort(((e,t)=>t.node.stream.viewersCount-e.node.stream.viewersCount)));break}case"PersonalSections":{const n=a.data.personalSections.find((e=>"FOLLOWED_SECTION"===e.type));if(n){const a=await e.fetch("/youtube/get-stream");s(a)&&a.body&&(n.items.push(function({title:e,viewersCount:t,profileImageURL:a,previewImageURL:n}){return {trackingID:"1bb8ab4b-aed2-4f25-a750-c295d57e6a95",promotionsCampaignID:"",user:{id:"40934651",login:"ludwig",displayName:"ludwig",profileImageURL:a,primaryColorHex:"00FFE2",broadcastSettings:{id:"40934651",title:e,__typename:"BroadcastSettings"},channel:{id:"40934651",creatorAnniversaries:{id:"40934651",isAnniversary:!1,__typename:"CreatorAnniversaries"},__typename:"Channel"},__typename:"User"},label:"NONE",content:{id:"-1",previewImageURL:n,broadcaster:{id:"40934651",broadcastSettings:{id:"40934651",title:e,__typename:"BroadcastSettings"},__typename:"User"},viewersCount:t,self:{canWatch:!0,isRestricted:!1,restrictionType:null,__typename:"StreamSelfConnection"},game:{id:"-1",displayName:"YouTube",name:"YouTube",__typename:"Game"},type:"live",__typename:"Stream"},__typename:"PersonalSectionChannel"}}(a.body)),n.items.sort(((e,t)=>(t.content.viewersCount||0)-(e.content.viewersCount||0))));}break}case"StreamMetadata":{const n=a.data;if("40934651"===n.user.id){const a=await e.fetch("/youtube/get-stream");s(a)&&a.body&&(n.user.lastBroadcast.id="-1",n.user.lastBroadcast.title=a.body.title,n.user.stream={id:"-1",type:"live",createdAt:(new Date).toJSON(),viewersCount:a.body.viewersCount,game:{id:"-1",name:"YouTube",__typename:"Game"},__typename:"Stream"});}break}default:{const o=a.data;if("40934651"===(null===(n=o.user)||void 0===n?void 0:n.id)&&(null===(r=null===(i=o.user)||void 0===i?void 0:i.lastBroadcast)||void 0===r?void 0:r.title)){const a=await e.fetch("/youtube/get-stream");s(a)&&a.body&&(o.user.lastBroadcast.title=a.body.title);}}}}catch(e){}}const i=window.fetch.bind(window);window.fetch=async function(e,t){const n=await i(e,t);try{let t;if(t="string"==typeof e?e:e.url,!t.includes("gql.twitch.tv/gql"))return n;const i=n.text.bind(n),r=n.json.bind(n);n.text=async function(){const e=await i();try{const t=JSON.parse(e);return await a(t),JSON.stringify(t)}catch(t){return e}},n.json=async function(){const e=await r();try{return await a(e),e}catch(t){return e}};}catch(e){return n}return n};}(new e);
async function a(e) {
if (Array.isArray(e))
for (const t of e) await n(t);
return e
}
async function n(a) {
var n, i, r;
try {
switch (a.extensions.operationName) {
case "FollowingLive_CurrentUser": {
const n = a.data,
i = await e.fetch("/youtube/get-stream");
s(i) && i.body && (n.currentUser.followedLiveUsers.edges.push(function({
title: e,
viewersCount: t,
profileImageURL: a,
previewImageURL: n
}) {
return {
__typename: "FollowedLiveUserEdge",
cursor: "LTE=",
node: {
__typename: "User",
id: "40934651",
displayName: "ludwig",
login: "ludwig",
profileImageURL: a,
stream: {
broadcaster: {
id: "40934651",
primaryColorHex: "00FFE2",
__typename: "User",
channel: {
id: "40934651",
self: {
isAuthorized: !0,
__typename: "ChannelSelfEdge"
},
__typename: "Channel"
}
},
id: "-1",
previewImageURL: n,
game: {
id: "-1",
name: "YouTube",
displayName: "YouTube",
boxArtURL: "https://i.postimg.cc/NjQvCPh2/image.png",
__typename: "Game"
},
restriction: null,
tags: [],
title: e,
type: "live",
viewersCount: t,
__typename: "Stream"
}
}
}
}(i.body)), n.currentUser.followedLiveUsers.edges.sort(((e, t) => t.node.stream.viewersCount - e.node.stream.viewersCount)));
break
}
case "PersonalSections": {
const n = a.data.personalSections.find((e => "FOLLOWED_SECTION" === e.type));
if (n) {
const a = await e.fetch("/youtube/get-stream");
s(a) && a.body && (n.items.push(function({
title: e,
viewersCount: t,
profileImageURL: a,
previewImageURL: n
}) {
return {
trackingID: "1bb8ab4b-aed2-4f25-a750-c295d57e6a95",
promotionsCampaignID: "",
user: {
id: "40934651",
login: "ludwig",
displayName: "ludwig",
profileImageURL: a,
primaryColorHex: "00FFE2",
broadcastSettings: {
id: "40934651",
title: e,
__typename: "BroadcastSettings"
},
channel: {
id: "40934651",
creatorAnniversaries: {
id: "40934651",
isAnniversary: !1,
__typename: "CreatorAnniversaries"
},
__typename: "Channel"
},
__typename: "User"
},
label: "NONE",
content: {
id: "-1",
previewImageURL: n,
broadcaster: {
id: "40934651",
broadcastSettings: {
id: "40934651",
title: e,
__typename: "BroadcastSettings"
},
__typename: "User"
},
viewersCount: t,
self: {
canWatch: !0,
isRestricted: !1,
restrictionType: null,
__typename: "StreamSelfConnection"
},
game: {
id: "-1",
displayName: "YouTube",
name: "YouTube",
__typename: "Game"
},
type: "live",
__typename: "Stream"
},
__typename: "PersonalSectionChannel"
}
}(a.body)), n.items.sort(((e, t) => (t.content.viewersCount || 0) - (e.content.viewersCount || 0))));
}
break
}
case "StreamMetadata": {
const n = a.data;
if ("40934651" === n.user.id) {
const a = await e.fetch("/youtube/get-stream");
s(a) && a.body && (n.user.lastBroadcast.id = "-1", n.user.lastBroadcast.title = a.body.title, n.user.stream = {
id: "-1",
type: "live",
createdAt: (new Date).toJSON(),
viewersCount: a.body.viewersCount,
game: {
id: "-1",
name: "YouTube",
__typename: "Game"
},
__typename: "Stream"
});
}
break
}
default: {
const o = a.data;
if ("40934651" === (null === (n = o.user) || void 0 === n ? void 0 : n.id) && (null === (r = null === (i = o.user) || void 0 === i ? void 0 : i.lastBroadcast) || void 0 === r ? void 0 : r.title)) {
const a = await e.fetch("/youtube/get-stream");
s(a) && a.body && (o.user.lastBroadcast.title = a.body.title);
}
}
}
} catch (e) {}
}
const i = window.fetch.bind(window);
window.fetch = async function(e, t) {
const n = await i(e, t);
try {
let t;
if (t = "string" == typeof e ? e : e.url, !t.includes("gql.twitch.tv/gql")) return n;
const i = n.text.bind(n),
r = n.json.bind(n);
n.text = async function() {
const e = await i();
try {
const t = JSON.parse(e);
return await a(t), JSON.stringify(t)
} catch (t) {
return e
}
}, n.json = async function() {
const e = await r();
try {
return await a(e), e
} catch (t) {
return e
}
};
} catch (e) {
return n
}
return n
};
}(new e);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,35 @@
function n() {
let n = function() {
var n, t;
const e = document.querySelector("ytd-page-manager");
return null === (t = null === (n = null == e ? void 0 : e.data) || void 0 === n ? void 0 : n.playerResponse) || void 0 === t ? void 0 : t.videoDetails
}();
return n || (n = function() {
const n = new URLSearchParams(window.location.hash.substring(1)).get("OpXmfbXQaCyUDUFX");
if (n) try {
return JSON.parse(n)
} catch (n) {
return
}
}(), n || void 0)
}
function t(t = !0) {
var e;
const i = n();
return null !== (e = null == i ? void 0 : i.isLive) && void 0 !== e ? e : t
}
function e(t = !0) {
const e = n();
if (e) {
return ["UCZaVG6KWBuquVXt63G6xopg", "UCrPseYLGpNygVi34QpGNqpA"].includes(e.channelId) && e.isLiveContent
}
return t
}
export {
e,
n,
t
};

View File

@ -1,25 +0,0 @@
function n() {
let n = function() {
var n, e;
const t = document.querySelector("ytd-page-manager");
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() {
const n = new URLSearchParams(window.location.hash.substring(1)).get("QXZRwEzaeHNfDqtD");
if (n) try {
return JSON.parse(n)
} catch (n) {
return
}
}(), n || void 0)
}
function e(e = !0) {
const t = n();
return t ? "UCrPseYLGpNygVi34QpGNqpA" === t.channelId && t.isLiveContent : e
}
export {
e,
n
};

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

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

View File

@ -1,7 +1,7 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "Mogul.TV", "name": "Mogul.TV",
"version": "2.0.1", "version": "3.0.1",
"description": "Enhance your Ludwig viewing experience", "description": "Enhance your Ludwig viewing experience",
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {
@ -48,7 +48,7 @@
"assets/index-26a612d9.js" "assets/index-26a612d9.js"
], ],
"matches": [ "matches": [
"*://v2.mogultv.org/*" "*://truffle-tv-source-test.truffle-tv.workers.dev/*"
], ],
"run_at": "document_idle" "run_at": "document_idle"
} }
@ -56,24 +56,26 @@
"permissions": [ "permissions": [
"cookies", "cookies",
"storage", "storage",
"tabs",
"activeTab",
"*://*.youtube.com/*", "*://*.youtube.com/*",
"*://*.twitch.tv/*", "*://*.twitch.tv/*",
"*://v2.mogultv.org/*" "*://truffle-tv-source-test.truffle-tv.workers.dev/*"
], ],
"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-4f2074c6.js",
"get_stream_details-b6177000.js", "get_stream_details-70a52c12.js",
"index-6137f488.js", "parse_token.util-73818eef.js",
"parse_token.util-ed270559.js", "constants-27e12ede.js",
"fetch_youtube-71c76849.js", "index-2879cf47.js",
"router.interface-6cdbc015.js", "router.interface-6cdbc015.js",
"style-inject.es-a0e1a0ba.js", "style-inject.es-a0e1a0ba.js",
"storage-a8ac7bd3.js", "storage-6f9cf62e.js",
"background.content-5f02aba1.js", "background.content-5d20fc40.js",
"inject_script.util-c1ec59e3.js", "inject_script.util-e25f022c.js",
"connectRuntime-a699491c.js", "connectRuntime-a983a955.js",
"when_ready.util-91474a6b.js", "when_ready.util-91474a6b.js",
"content/twitch/index.js", "content/twitch/index.js",
"content/youtube/index.js", "content/youtube/index.js",

View File

@ -1,6 +1,6 @@
var t; var t;
! function(t) { ! function(t) {
t[t.Twitch = 0] = "Twitch", t[t.FFZ = 1] = "FFZ", t[t.BTTV = 2] = "BTTV", t[t.Custom = 3] = "Custom"; t[t.Twitch = 0] = "Twitch", t[t.FFZ = 1] = "FFZ", t[t.BTTV = 2] = "BTTV", t[t.Custom = 3] = "Custom", t[t.Spore = 4] = "Spore";
}(t || (t = {})); }(t || (t = {}));
var e = { var e = {
black: "#000", black: "#000",
@ -102,7 +102,7 @@ var s = {
A400: "#ff9100", A400: "#ff9100",
A700: "#ff6d00" A700: "#ff6d00"
}; };
var c = { var f = {
50: "#fafafa", 50: "#fafafa",
100: "#f5f5f5", 100: "#f5f5f5",
200: "#eeeeee", 200: "#eeeeee",
@ -119,14 +119,14 @@ var c = {
A700: "#616161" A700: "#616161"
}; };
function f() { function c() {
return f = Object.assign || function(t) { return c = Object.assign || function(t) {
for (var e = 1; e < arguments.length; e++) { for (var e = 1; e < arguments.length; e++) {
var n = arguments[e]; var n = arguments[e];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]); for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
} }
return t return t
}, f.apply(this, arguments) }, c.apply(this, arguments)
} }
function u(t, e) { function u(t, e) {
@ -144,7 +144,7 @@ function l(t) {
function d(t, e, n = { function d(t, e, n = {
clone: !0 clone: !0
}) { }) {
const r = n.clone ? f({}, t) : t; const r = n.clone ? c({}, t) : t;
return l(t) && l(e) && Object.keys(e).forEach((a => { return l(t) && l(e) && Object.keys(e).forEach((a => {
"__proto__" !== a && (l(e[a]) && a in t && l(t[a]) ? r[a] = d(t[a], e[a], n) : r[a] = e[a]); "__proto__" !== a && (l(e[a]) && a in t && l(t[a]) ? r[a] = d(t[a], e[a], n) : r[a] = e[a]);
})), r })), r
@ -333,26 +333,26 @@ function L(t = {}, ...e) {
return `@media (max-width:${("number"==typeof e[t]?e[t]:t)-r/100}${n})` return `@media (max-width:${("number"==typeof e[t]?e[t]:t)-r/100}${n})`
} }
function c(t, a) { function f(t, a) {
const o = i.indexOf(a); const o = i.indexOf(a);
return `@media (min-width:${"number"==typeof e[t]?e[t]:t}${n}) and (max-width:${(-1!==o&&"number"==typeof e[i[o]]?e[i[o]]:a)-r/100}${n})` return `@media (min-width:${"number"==typeof e[t]?e[t]:t}${n}) and (max-width:${(-1!==o&&"number"==typeof e[i[o]]?e[i[o]]:a)-r/100}${n})`
} }
return f({ return c({
keys: i, keys: i,
values: e, values: e,
up: o, up: o,
down: s, down: s,
between: c, between: f,
only: function(t) { only: function(t) {
return i.indexOf(t) + 1 < i.length ? c(t, i[i.indexOf(t) + 1]) : o(t) return i.indexOf(t) + 1 < i.length ? f(t, i[i.indexOf(t) + 1]) : o(t)
}, },
not: function(t) { not: function(t) {
const e = i.indexOf(t); const e = i.indexOf(t);
return 0 === e ? o(i[1]) : e === i.length - 1 ? s(i[e]) : c(t, i[i.indexOf(t) + 1]).replace("@media", "@media not all and") return 0 === e ? o(i[1]) : e === i.length - 1 ? s(i[e]) : f(t, i[i.indexOf(t) + 1]).replace("@media", "@media not all and")
}, },
unit: n unit: n
}, a) }, a)
}(n), c = function(t = 8) { }(n), f = function(t = 8) {
if (t.mui) return t; if (t.mui) return t;
const e = B({ const e = B({
spacing: t spacing: t
@ -367,11 +367,11 @@ function L(t = {}, ...e) {
breakpoints: s, breakpoints: s,
direction: "ltr", direction: "ltr",
components: {}, components: {},
palette: f({ palette: c({
mode: "light" mode: "light"
}, r), }, r),
spacing: c, spacing: f,
shape: f({}, W, i) shape: c({}, W, i)
}, o); }, o);
return l = e.reduce(((t, e) => d(t, e)), l), l return l = e.reduce(((t, e) => d(t, e)), l), l
} }
@ -420,10 +420,10 @@ function _(t) {
values: e values: e
} = t, n = e[0], r = e[1] / 100, a = e[2] / 100, i = r * Math.min(a, 1 - a), o = (t, e = (t + n / 30) % 12) => a - i * Math.max(Math.min(e - 3, 9 - e, 1), -1); } = t, n = e[0], r = e[1] / 100, a = e[2] / 100, i = r * Math.min(a, 1 - a), o = (t, e = (t + n / 30) % 12) => a - i * Math.max(Math.min(e - 3, 9 - e, 1), -1);
let s = "rgb"; let s = "rgb";
const c = [Math.round(255 * o(0)), Math.round(255 * o(8)), Math.round(255 * o(4))]; const f = [Math.round(255 * o(0)), Math.round(255 * o(8)), Math.round(255 * o(4))];
return "hsla" === t.type && (s += "a", c.push(e[3])), P({ return "hsla" === t.type && (s += "a", f.push(e[3])), P({
type: s, type: s,
values: c values: f
}) })
}(t)).values : t.values; }(t)).values : t.values;
return e = e.map((e => ("color" !== t.type && (e /= 255), e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4))), Number((.2126 * e[0] + .7152 * e[1] + .0722 * e[2]).toFixed(3)) return e = e.map((e => ("color" !== t.type && (e /= 255), e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4))), Number((.2126 * e[0] + .7152 * e[1] + .0722 * e[2]).toFixed(3))
@ -589,7 +589,7 @@ function Z(t) {
lightShade: r = 300, lightShade: r = 300,
darkShade: a = 700 darkShade: a = 700
}) => { }) => {
if (!(t = f({}, t)).main && t[n] && (t.main = t[n]), !t.hasOwnProperty("main")) throw new Error(p(11, e ? ` (${e})` : "", n)); if (!(t = c({}, t)).main && t[n] && (t.main = t[n]), !t.hasOwnProperty("main")) throw new Error(p(11, e ? ` (${e})` : "", n));
if ("string" != typeof t.main) throw new Error(p(12, e ? ` (${e})` : "", JSON.stringify(t.main))); if ("string" != typeof t.main) throw new Error(p(12, e ? ` (${e})` : "", JSON.stringify(t.main)));
return J(t, "light", r, h), J(t, "dark", a, h), t.contrastText || (t.contrastText = A(t.main)), t return J(t, "light", r, h), J(t, "dark", a, h), t.contrastText || (t.contrastText = A(t.main)), t
}, },
@ -597,7 +597,7 @@ function Z(t) {
dark: D, dark: D,
light: U light: U
}; };
return d(f({ return d(c({
common: e, common: e,
mode: l, mode: l,
primary: $({ primary: $({
@ -627,7 +627,7 @@ function Z(t) {
color: v, color: v,
name: "success" name: "success"
}), }),
grey: c, grey: f,
contrastThreshold: g, contrastThreshold: g,
getContrastText: A, getContrastText: A,
augmentColor: $, augmentColor: $,
@ -648,7 +648,7 @@ function Q(t, e) {
fontWeightLight: i = 300, fontWeightLight: i = 300,
fontWeightRegular: o = 400, fontWeightRegular: o = 400,
fontWeightMedium: s = 500, fontWeightMedium: s = 500,
fontWeightBold: c = 700, fontWeightBold: f = 700,
htmlFontSize: l = 16, htmlFontSize: l = 16,
allVariants: p, allVariants: p,
pxToRem: g pxToRem: g
@ -657,7 +657,7 @@ function Q(t, e) {
m = a / 14, m = a / 14,
b = g || (t => t / l * m + "rem"), b = g || (t => t / l * m + "rem"),
y = (t, e, n, a, i) => { y = (t, e, n, a, i) => {
return f({ return c({
fontFamily: r, fontFamily: r,
fontWeight: t, fontWeight: t,
fontSize: b(e), fontSize: b(e),
@ -682,7 +682,7 @@ function Q(t, e) {
caption: y(o, 12, 1.66, .4), caption: y(o, 12, 1.66, .4),
overline: y(o, 12, 2.66, 1, K) overline: y(o, 12, 2.66, 1, K)
}; };
return d(f({ return d(c({
htmlFontSize: l, htmlFontSize: l,
pxToRem: b, pxToRem: b,
fontFamily: r, fontFamily: r,
@ -690,7 +690,7 @@ function Q(t, e) {
fontWeightLight: i, fontWeightLight: i,
fontWeightRegular: o, fontWeightRegular: o,
fontWeightMedium: s, fontWeightMedium: s,
fontWeightBold: c fontWeightBold: f
}, x), h, { }, x), h, {
clone: !1 clone: !1
}) })
@ -728,9 +728,9 @@ function ot(t) {
} }
function st(t) { function st(t) {
const e = f({}, rt, t.easing), const e = c({}, rt, t.easing),
n = f({}, at, t.duration); n = c({}, at, t.duration);
return f({ return c({
getAutoHeightDuration: ot, getAutoHeightDuration: ot,
create: (t = ["all"], r = {}) => { create: (t = ["all"], r = {}) => {
const { const {
@ -745,7 +745,7 @@ function st(t) {
duration: n duration: n
}) })
} }
var ct = { var ft = {
mobileStepper: 1e3, mobileStepper: 1e3,
speedDial: 1050, speedDial: 1050,
appBar: 1100, appBar: 1100,
@ -754,7 +754,7 @@ var ct = {
snackbar: 1400, snackbar: 1400,
tooltip: 1500 tooltip: 1500
}; };
const ft = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"]; const ct = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
function ut(t = {}, ...e) { function ut(t = {}, ...e) {
const { const {
@ -762,9 +762,9 @@ function ut(t = {}, ...e) {
palette: r = {}, palette: r = {},
transitions: a = {}, transitions: a = {},
typography: i = {} typography: i = {}
} = t, o = u(t, ft), s = Z(r), c = L(t); } = t, o = u(t, ct), s = Z(r), f = L(t);
let l = d(c, { let l = d(f, {
mixins: (p = c.breakpoints, c.spacing, g = n, f({ mixins: (p = f.breakpoints, f.spacing, g = n, c({
toolbar: { toolbar: {
minHeight: 56, minHeight: 56,
[`${p.up("xs")} and (orientation: landscape)`]: { [`${p.up("xs")} and (orientation: landscape)`]: {
@ -779,7 +779,7 @@ function ut(t = {}, ...e) {
shadows: et.slice(), shadows: et.slice(),
typography: Q(s, i), typography: Q(s, i),
transitions: st(a), transitions: st(a),
zIndex: f({}, ct) zIndex: c({}, ft)
}); });
var p, g; var p, g;
return l = d(l, o), l = e.reduce(((t, e) => d(t, e)), l), l return l = d(l, o), l = e.reduce(((t, e) => d(t, e)), l), l
@ -821,7 +821,7 @@ function dt(t) {
if (!t) return; if (!t) return;
return JSON.parse(atob(t.split(".")[1])) return JSON.parse(atob(t.split(".")[1]))
} catch (t) { } catch (t) {
return void console.error(t) return
} }
} }
@ -834,10 +834,10 @@ export {
Y, Y,
ut as a, ut as a,
d as b, d as b,
lt as c, c,
dt as d, dt as d,
at as e, lt as e,
f, at as f,
g, g,
h, h,
j, j,

File diff suppressed because it is too large Load Diff

View File

@ -882,7 +882,8 @@ var r = {
var s = r.exports; var s = r.exports;
const n = { const n = {
auth: { auth: {
token: void 0 token: void 0,
token2: void 0
}, },
settings: { settings: {
theaterMode: !0, theaterMode: !0,