This commit is contained in:
2026-03-20 17:55:48 +09:00
parent 406e7820bc
commit 3f0a7d0d5c
9 changed files with 598 additions and 192 deletions
@@ -55,6 +55,36 @@ port.onMessage.addListener(response => {
var type= response["type"];
switch (type) {
case "CLICK_PREV_CHAPTER" : {
const links = document.querySelectorAll("a");
let found = false;
for (let link of links) {
if (link.textContent.includes("이전화 보기")) {
link.click();
found = true;
break;
}
}
if (!found) {
port.postMessage({ type: "MSG", msg: "이전화 버튼을 찾을 수 없습니다." });
}
break;
}
case "CLICK_NEXT_CHAPTER" : {
const links = document.querySelectorAll("a");
let found = false;
for (let link of links) {
if (link.textContent.includes("다음화 보기")) {
link.click();
found = true;
break;
}
}
if (!found) {
port.postMessage({ type: "MSG", msg: "다음화 버튼을 찾을 수 없습니다." });
}
break;
}
case "fetchAllImages": {
const targetSrc = response["targetSrc"];
const imageUrls = findAllRelatedImages(targetSrc);