forked from 50n50/sources
Update animenana/animenana.js
This commit is contained in:
+10
-3
@@ -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())
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user