From b2c2e6c7438e29e125ecfee6d4fbef6aad8d80cb Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 2 Jul 2023 15:07:28 +0000 Subject: [PATCH] build: update v0.1.2 files (auto) --- dist/pixiv-downloader.user.js | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/dist/pixiv-downloader.user.js b/dist/pixiv-downloader.user.js index b9aa244..67584ae 100644 --- a/dist/pixiv-downloader.user.js +++ b/dist/pixiv-downloader.user.js @@ -139,26 +139,15 @@ `); - updatePbdDownloadManager(pbdDownloadManager2); - return pbdDownloadManager2; - } - async function updatePbdDownloadManager(pbdDownloadManager2) { - const pbdSelect = pbdDownloadManager2.querySelector("select"); const pbdDownload = pbdDownloadManager2.querySelector("#pbd-download"); const pbdBulkDownload = pbdDownloadManager2.querySelector("#pbd-bulk-download"); + const pbdSelect = pbdDownloadManager2.querySelector("select"); const pbdFilename = pbdDownloadManager2.querySelector("#pbd-filename"); const illustId = getIllustId(); const illustPages = await fetchIllustPages(illustId); - pbdSelect.innerHTML = ""; - pbdFilename.value = _GM_getValue("illust_filename") ?? DEFAULT_FILENAME_FORMAT; pbdFilename.addEventListener("change", () => { _GM_setValue("illust_filename", pbdFilename.value); }); - for (const page of illustPages) { - const partName = getIllustPagePartName(page.urls.original); - const elem = fromHTML(``); - pbdSelect.append(elem); - } const template = { headers: { Referer: "https://www.pixiv.net/" @@ -180,6 +169,21 @@ }); } }); + updatePbdDownloadManager(pbdDownloadManager2); + return pbdDownloadManager2; + } + async function updatePbdDownloadManager(pbdDownloadManager2) { + const pbdSelect = pbdDownloadManager2.querySelector("select"); + const pbdFilename = pbdDownloadManager2.querySelector("#pbd-filename"); + const illustId = getIllustId(); + const illustPages = await fetchIllustPages(illustId); + pbdSelect.innerHTML = ""; + pbdFilename.value = _GM_getValue("illust_filename") ?? DEFAULT_FILENAME_FORMAT; + for (const page of illustPages) { + const partName = getIllustPagePartName(page.urls.original); + const elem = fromHTML(``); + pbdSelect.append(elem); + } } class PageEvent { constructor() {