Skip to content

Commit

Permalink
build: update v0.1.2 files (auto)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 2, 2023
1 parent 7ab4b7a commit b2c2e6c
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions dist/pixiv-downloader.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,26 +139,15 @@
</div>
</div>
`);
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(`<option value="${page.urls.original}">${partName}</option>`);
pbdSelect.append(elem);
}
const template = {
headers: {
Referer: "https://www.pixiv.net/"
Expand All @@ -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(`<option value="${page.urls.original}">${partName}</option>`);
pbdSelect.append(elem);
}
}
class PageEvent {
constructor() {
Expand Down

0 comments on commit b2c2e6c

Please sign in to comment.