Skip to content

Commit e829bb2

Browse files
committed
chore: build dev
1 parent 6cc5c84 commit e829bb2

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

dist/BetterYTM.user.js

Lines changed: 18 additions & 14 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@4ca0c620/assets/images/logo/logo_dev_48.png
11+
// @icon https://cdn.jsdelivr.net/gh/Sv443/BetterYTM@6cc5c84a/assets/images/logo/logo_dev_48.png
1212
// @match https://music.youtube.com/*
1313
// @match https://www.youtube.com/*
1414
// @run-at document-start
@@ -313,7 +313,7 @@ const rawConsts = {
313313
mode: "development",
314314
branch: "develop",
315315
host: "github",
316-
buildNumber: "4ca0c620",
316+
buildNumber: "6cc5c84a",
317317
assetSource: "jsdelivr",
318318
devServerPort: "8710",
319319
};
@@ -5366,14 +5366,15 @@ async function addQueueButtons(queueItem, containerParentSelector = ".song-info"
53665366
if (!cachedLyricsEntry) {
53675367
queueItem.setAttribute("data-bytm-loading", "");
53685368
if (imgEl) {
5369-
if (imgEl.tagName === "IMG")
5369+
if (imgEl.tagName === "IMG") {
53705370
imgEl.src = await getResourceUrl("icon-spinner");
5371+
imgEl === null || imgEl === void 0 ? void 0 : imgEl.classList.add("bytm-spinner");
5372+
}
53715373
else if (lyricsBtnElem) {
53725374
setInnerHtml(lyricsBtnElem, await resourceAsString("icon-spinner"));
5373-
(_a = lyricsBtnElem.querySelector("svg")) === null || _a === void 0 ? void 0 : _a.classList.add("bytm-generic-btn-img");
5375+
(_a = lyricsBtnElem.querySelector("svg")) === null || _a === void 0 ? void 0 : _a.classList.add("bytm-generic-btn-img", "bytm-spinner");
53745376
}
53755377
}
5376-
imgEl === null || imgEl === void 0 ? void 0 : imgEl.classList.add("bytm-spinner");
53775378
}
53785379
lyricsUrl = (_b = cachedLyricsEntry === null || cachedLyricsEntry === void 0 ? void 0 : cachedLyricsEntry.url) !== null && _b !== void 0 ? _b : await fetchLyricsUrlTop(artistsSan, songSan);
53795380
if (lyricsUrl) {
@@ -5387,14 +5388,15 @@ async function addQueueButtons(queueItem, containerParentSelector = ".song-info"
53875388
const resetImgElem = async () => {
53885389
var _a;
53895390
if (imgEl) {
5390-
if (imgEl.tagName === "IMG")
5391+
if (imgEl.tagName === "IMG") {
53915392
imgEl.src = lyricsIconUrl;
5393+
imgEl === null || imgEl === void 0 ? void 0 : imgEl.classList.remove("bytm-spinner");
5394+
}
53925395
else if (lyricsBtnElem) {
53935396
setInnerHtml(lyricsBtnElem, await resourceAsString("icon-lyrics"));
53945397
(_a = lyricsBtnElem.querySelector("svg")) === null || _a === void 0 ? void 0 : _a.classList.add("bytm-generic-btn-img");
53955398
}
53965399
}
5397-
imgEl === null || imgEl === void 0 ? void 0 : imgEl.classList.remove("bytm-spinner");
53985400
};
53995401
if (!cachedLyricsEntry) {
54005402
queueItem.removeAttribute("data-bytm-loading");
@@ -5420,14 +5422,14 @@ async function addQueueButtons(queueItem, containerParentSelector = ".song-info"
54205422
deleteBtnElem.role = "button";
54215423
deleteBtnElem.tabIndex = 0;
54225424
deleteBtnElem.style.visibility = "initial";
5423-
const imgElem = document.createElement("img");
5424-
imgElem.classList.add("bytm-generic-btn-img");
5425-
imgElem.src = deleteIconUrl;
5425+
const delImgElem = document.createElement("img");
5426+
delImgElem.classList.add("bytm-generic-btn-img");
5427+
delImgElem.src = deleteIconUrl;
54265428
onInteraction(deleteBtnElem, async (e) => {
54275429
e.preventDefault();
54285430
e.stopImmediatePropagation();
5429-
imgElem.src = spinnerIconUrl;
5430-
imgElem.classList.add("bytm-spinner");
5431+
delImgElem.src = spinnerIconUrl;
5432+
delImgElem.classList.add("bytm-spinner");
54315433
// container of the queue item popup menu - element gets reused for every queue item
54325434
let queuePopupCont = document.querySelector("ytmusic-app ytmusic-popup-container tp-yt-iron-dropdown");
54335435
try {
@@ -5445,6 +5447,8 @@ async function addQueueButtons(queueItem, containerParentSelector = ".song-info"
54455447
queuePopupCont = document.querySelector("ytmusic-app ytmusic-popup-container tp-yt-iron-dropdown");
54465448
queuePopupCont === null || queuePopupCont === void 0 ? void 0 : queuePopupCont.setAttribute("data-bytm-hidden", "true");
54475449
await UserUtils.pauseFor(15);
5450+
delImgElem.src = deleteIconUrl;
5451+
delImgElem.classList.remove("bytm-spinner");
54485452
const removeFromQueueBtn = queuePopupCont === null || queuePopupCont === void 0 ? void 0 : queuePopupCont.querySelector("tp-yt-paper-listbox ytmusic-menu-service-item-renderer:nth-of-type(3)");
54495453
removeFromQueueBtn === null || removeFromQueueBtn === void 0 ? void 0 : removeFromQueueBtn.click();
54505454
// queue items aren't removed automatically outside of the current queue
@@ -5456,7 +5460,7 @@ async function addQueueButtons(queueItem, containerParentSelector = ".song-info"
54565460
if (!removeFromQueueBtn) {
54575461
error("Couldn't find 'remove from queue' button in queue item three dots menu.\nPlease make sure all autoplay restrictions on your browser's side are disabled for this page.");
54585462
dotsBtnElem === null || dotsBtnElem === void 0 ? void 0 : dotsBtnElem.click();
5459-
imgElem.src = await getResourceUrl("icon-error");
5463+
delImgElem.src = await getResourceUrl("icon-error");
54605464
if (deleteBtnElem)
54615465
deleteBtnElem.ariaLabel = deleteBtnElem.title = (listType === "currentQueue" ? t("couldnt_remove_from_queue") : t("couldnt_delete_from_list"));
54625466
}
@@ -5468,7 +5472,7 @@ async function addQueueButtons(queueItem, containerParentSelector = ".song-info"
54685472
queuePopupCont === null || queuePopupCont === void 0 ? void 0 : queuePopupCont.removeAttribute("data-bytm-hidden");
54695473
}
54705474
});
5471-
deleteBtnElem.appendChild(imgElem);
5475+
deleteBtnElem.appendChild(delImgElem);
54725476
}
54735477
lyricsBtnElem && queueBtnsCont.appendChild(createRipple(lyricsBtnElem));
54745478
deleteBtnElem && queueBtnsCont.appendChild(createRipple(deleteBtnElem));

0 commit comments

Comments
 (0)