RCO: expand page search (#8541)

Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com>
This commit is contained in:
Vetle Ledaal 2025-04-19 13:55:11 +02:00 committed by Draff
parent b6ab8fb843
commit ad829436f1
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 21 additions and 12 deletions

View File

@ -29,19 +29,28 @@
arrays.forEach(arrayValue => {
functions.forEach(funcValue => {
try {
const mapped = arrayValue.map(x => funcValue(x));
const argCount = funcValue.length;
if (
Array.isArray(mapped) &&
mapped.length != 0 &&
mapped.every(item => typeof item === 'string' && isValidUrl(item))
) {
results.push(mapped);
}
} catch (err) {}
for (let i = 0; i < argCount; i++) {
try {
const mapped = arrayValue.map(elem => {
const args = new Array(argCount).fill(undefined);
args[i] = elem;
return funcValue(...args);
});
if (
Array.isArray(mapped) &&
mapped.length !== 0 &&
mapped.every(item => typeof item === 'string' && isValidUrl(item))
) {
results.push(mapped);
break;
}
} catch (err) {}
}
});
});
return results
return results;
})();

View File

@ -1,7 +1,7 @@
ext {
extName = 'ReadComicOnline'
extClass = '.Readcomiconline'
extVersionCode = 33
extVersionCode = 34
}
apply from: "$rootDir/common.gradle"