Skip to content

Commit 69a5543

Browse files
committed
chore: build dev
1 parent 37ddfc2 commit 69a5543

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

dist/BetterYTM.user.js

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// @license AGPL-3.0-only
99
// @author Sv443
1010
// @copyright Sv443 (https://github.com/Sv443)
11-
// @icon https://cdn.jsdelivr.net/gh/Sv443/BetterYTM@86c7957b/assets/images/logo/logo_dev_48.png
11+
// @icon https://cdn.jsdelivr.net/gh/Sv443/BetterYTM@37ddfc25/assets/images/logo/logo_dev_48.png
1212
// @match https://music.youtube.com/*
1313
// @match https://www.youtube.com/*
1414
// @run-at document-start
@@ -311,7 +311,7 @@ const rawConsts = {
311311
mode: "development",
312312
branch: "develop",
313313
host: "github",
314-
buildNumber: "86c7957b",
314+
buildNumber: "37ddfc25",
315315
assetSource: "jsdelivr",
316316
devServerPort: "8710",
317317
};
@@ -7754,7 +7754,7 @@ function preInit() {
77547754
"FireMonkey",
77557755
];
77567756
if (unsupportedHandlers.includes((_b = (_a = GM === null || GM === void 0 ? void 0 : GM.info) === null || _a === void 0 ? void 0 : _a.scriptHandler) !== null && _b !== void 0 ? _b : "_"))
7757-
return alert(`BetterYTM does not work when using ${GM.info.scriptHandler} as the userscript manager extension and will be disabled.\nI recommend using either ViolentMonkey, TamperMonkey or GreaseMonkey.`);
7757+
return showPrompt({ type: "alert", message: `BetterYTM does not work when using ${GM.info.scriptHandler} as the userscript manager extension and will be disabled.\nI recommend using either ViolentMonkey, TamperMonkey or GreaseMonkey.`, denyBtnText: "Close" });
77587758
log("Session ID:", getSessionId());
77597759
initInterface();
77607760
setLogLevel(defaultLogLevel);
@@ -7988,7 +7988,7 @@ function registerDevCommands() {
79887988
if (mode !== "development")
79897989
return;
79907990
GM.registerMenuCommand("Reset config", async () => {
7991-
if (confirm("Reset the configuration to its default values?\nThis will automatically reload the page.")) {
7991+
if (await showPrompt({ type: "confirm", message: "Reset the configuration to its default values?\nThis will automatically reload the page.", confirmBtnText: "Reset" })) {
79927992
await clearConfig();
79937993
await reloadTab();
79947994
}
@@ -8031,7 +8031,7 @@ function registerDevCommands() {
80318031
});
80328032
GM.registerMenuCommand("Delete all GM values", async () => {
80338033
const keys = await GM.listValues();
8034-
if (confirm(`Clear all ${keys.length} GM values?\nSee console for details.`)) {
8034+
if (await showPrompt({ type: "confirm", message: `Clear all ${keys.length} GM values?\nSee console for details.`, confirmBtnText: "Clear" })) {
80358035
dbg(`Clearing ${keys.length} GM values:`);
80368036
if (keys.length === 0)
80378037
dbg(" No values found.");
@@ -8043,7 +8043,7 @@ function registerDevCommands() {
80438043
});
80448044
GM.registerMenuCommand("Delete GM values by name (comma separated)", async () => {
80458045
var _a;
8046-
const keys = await showPrompt({ type: "prompt", message: "Enter the name(s) of the GM value to delete (comma separated).\nEmpty input cancels the operation." });
8046+
const keys = await showPrompt({ type: "prompt", message: "Enter the name(s) of the GM value to delete (comma separated).\nEmpty input cancels the operation.", confirmBtnText: "Delete" });
80478047
if (!keys)
80488048
return;
80498049
for (const key of (_a = keys === null || keys === void 0 ? void 0 : keys.split(",")) !== null && _a !== void 0 ? _a : []) {
@@ -8080,30 +8080,26 @@ function registerDevCommands() {
80808080
dbg(`Showing currently active listeners for ${Object.keys(globservers).length} observers with ${listenersAmt} total listeners:\n${lines.join("\n")}`);
80818081
});
80828082
GM.registerMenuCommand("Compress value", async () => {
8083-
const input = await showPrompt({ type: "prompt", message: "Enter the value to compress.\nSee console for output." });
8083+
const input = await showPrompt({ type: "prompt", message: "Enter the value to compress.\nSee console for output.", confirmBtnText: "Compress" });
80848084
if (input && input.length > 0) {
80858085
const compressed = await UserUtils.compress(input, compressionFormat);
80868086
dbg(`Compression result (${input.length} chars -> ${compressed.length} chars)\nValue: ${compressed}`);
80878087
}
80888088
});
80898089
GM.registerMenuCommand("Decompress value", async () => {
8090-
const input = await showPrompt({ type: "prompt", message: "Enter the value to decompress.\nSee console for output." });
8090+
const input = await showPrompt({ type: "prompt", message: "Enter the value to decompress.\nSee console for output.", confirmBtnText: "Decompress" });
80918091
if (input && input.length > 0) {
80928092
const decompressed = await UserUtils.decompress(input, compressionFormat);
80938093
dbg(`Decompresion result (${input.length} chars -> ${decompressed.length} chars)\nValue: ${decompressed}`);
80948094
}
80958095
});
80968096
GM.registerMenuCommand("Download DataStoreSerializer file", () => downloadData());
8097-
GM.registerMenuCommand("Export all data using DataStoreSerializer", async () => {
8098-
const ser = await getStoreSerializer().serialize();
8099-
dbg("Serialized data stores:", JSON.stringify(JSON.parse(ser)));
8100-
alert("See console.");
8101-
});
81028097
GM.registerMenuCommand("Import all data using DataStoreSerializer", async () => {
8103-
const input = await showPrompt({ type: "prompt", message: "Enter the serialized data to import:" });
8098+
const input = await showPrompt({ type: "prompt", message: "Paste the content of the export file to import:", confirmBtnText: "Import" });
81048099
if (input && input.length > 0) {
81058100
await getStoreSerializer().deserialize(input);
8106-
alert("Imported data. Reload the page to apply changes.");
8101+
if (await showPrompt({ type: "confirm", message: "Successfully imported data using DataStoreSerializer.\nReload the page to apply changes?", confirmBtnText: "Reload" }))
8102+
await reloadTab();
81078103
}
81088104
});
81098105
GM.registerMenuCommand("Throw error (toast example)", () => error("Test error thrown by user command:", new SyntaxError("Test error")));
@@ -8124,8 +8120,8 @@ function registerDevCommands() {
81248120
GM.registerMenuCommand("Toggle dev treatments", async () => {
81258121
const val = !await GM.getValue("bytm-dev-treatments", false);
81268122
await GM.setValue("bytm-dev-treatments", val);
8127-
alert(`Dev treatments are now ${val ? "enabled" : "disabled"}. Page will reload.`);
8128-
await reloadTab();
8123+
if (await showPrompt({ type: "confirm", message: `Dev treatments are now ${val ? "enabled" : "disabled"}.\nDo you want to reload the page?`, confirmBtnText: "Reload", denyBtnText: "nothxbye" }))
8124+
await reloadTab();
81298125
});
81308126
log("Registered dev menu commands");
81318127
}

0 commit comments

Comments
 (0)