|
@@ -1,7 +1,7 @@
|
|
|
import * as UserUtils from "@sv443-network/userutils";
|
|
|
import * as compareVersions from "compare-versions";
|
|
|
import { mode, branch, host, buildNumber, compressionFormat, scriptInfo } from "./constants.js";
|
|
|
-import { getDomain, waitVideoElementReady, getResourceUrl, getSessionId, getVideoTime, log, setLocale, getLocale, hasKey, hasKeyFor, t, tp, type TrLocale, info, error, onInteraction, getThumbnailUrl, getBestThumbnailUrl, fetchVideoVotes, setInnerHtml } from "./utils/index.js";
|
|
|
+import { getDomain, waitVideoElementReady, getResourceUrl, getSessionId, getVideoTime, log, setLocale, getLocale, hasKey, hasKeyFor, t, tp, type TrLocale, info, error, onInteraction, getThumbnailUrl, getBestThumbnailUrl, fetchVideoVotes, setInnerHtml, getCurrentMediaType } from "./utils/index.js";
|
|
|
import { addSelectorListener } from "./observers.js";
|
|
|
import { getFeatures, setFeatures } from "./config.js";
|
|
|
import { autoLikeStore, featInfo, fetchLyricsUrlTop, getLyricsCacheEntry, sanitizeArtists, sanitizeSong } from "./features/index.js";
|
|
@@ -127,6 +127,7 @@ const globalFuncs: InterfaceFunctions = {
|
|
|
getThumbnailUrl,
|
|
|
getBestThumbnailUrl,
|
|
|
waitVideoElementReady,
|
|
|
+ getCurrentMediaType,
|
|
|
|
|
|
// translations:
|
|
|
/**/ setLocale: setLocaleInterface,
|
|
@@ -188,7 +189,7 @@ export function initInterface() {
|
|
|
log("Initialized BYTM interface");
|
|
|
}
|
|
|
|
|
|
-/** Sets a global property on the unsafeWindow.BYTM object */
|
|
|
+/** Sets a global property on the unsafeWindow.BYTM object - ⚠️ use with caution as these props can be accessed by any script on the page! */
|
|
|
export function setGlobalProp<
|
|
|
TKey extends keyof Window["BYTM"],
|
|
|
TValue = Window["BYTM"][TKey],
|