1
0
forked from 50n50/sources

Update animenana/animenana.js

This commit is contained in:
aka paul
2025-11-02 16:14:55 +00:00
parent 4ffc40da02
commit 068d9f4c40
+10 -3
View File
@@ -1,3 +1,10 @@
function cleanTitle(title) {
return title
.replace(/’/g, "'")
.replace(/–/g, "-")
.replace(/&#[0-9]+;/g, "");
}
async function searchResults(keyword) {
const results = [];
try {
@@ -18,7 +25,7 @@ async function searchResults(keyword) {
results.push({
href: "https://animenana.com" + hrefMatch[1].trim(),
image: "https://animenana.com" + imgMatch[1].trim(),
title: titleMatch[1].trim()
title: cleanTitle(titleMatch[1].trim())
});
}
}
@@ -37,7 +44,7 @@ async function searchResults(keyword) {
results.push({
href: "https://animenana.com" + hrefMatch[1].trim(),
image: "https://animenana.com" + imgMatch[1].trim(),
title: titleMatch[1].trim()
title: cleanTitle(titleMatch[1].trim())
});
}
}
@@ -51,7 +58,7 @@ async function searchResults(keyword) {
results.push({
href: "https://animenana.com" + match[1].trim(),
image: "https://animenana.com" + match[2].trim(),
title: match[3].trim()
title: cleanTitle(match[3].trim())
});
}
}