Fix mangago
This commit is contained in:
parent
306883df6a
commit
f810ee942f
|
@ -6,7 +6,7 @@ ext {
|
|||
pkgNameSuffix = "en.mangago"
|
||||
extClass = '.Mangago'
|
||||
extVersionCode = 2
|
||||
extVersionSuffix = 1
|
||||
extVersionSuffix = 2
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -310,22 +310,30 @@ class Mangago : ParsedHttpSource() {
|
|||
|
||||
companion object {
|
||||
private const val IMGSRCS_DECODE_JS = """
|
||||
|
||||
function replacePos(a, b, l) {
|
||||
return a.substr(0, b) + l + a.substring(b + 1, a.length)
|
||||
function replacePos(a, b, c)
|
||||
{
|
||||
return (a.substr(0, b) + c) + a.substring((b + 1), a.length);
|
||||
}
|
||||
|
||||
function dorder(a, b) {
|
||||
var l = a.length;
|
||||
for (j = 3; 2 <= j; j--)
|
||||
for (i = l - 1; 0 <= i - (b[j] - 0); i--) 0 != i % 2 && (temp = a[i - (b[j] - 0)], a = replacePos(a, i - (b[j] - 0), a[i]), a = replacePos(a, i, temp));
|
||||
for (j = 1; 0 <= j; j--)
|
||||
for (i = l - 1; 0 <= i - (b[j] - 0); i--) 0 != i % 2 && (temp = a[i - (b[j] - 0)], a = replacePos(a, i - (b[j] - 0), a[i]), a = replacePos(a, i, temp));
|
||||
return a
|
||||
function dorder(a, b)
|
||||
{
|
||||
for (j = (b.length - 1); j >= 0; j--)
|
||||
{
|
||||
for (i = (a.length - 1); (i - b[j]) >= 0; i--)
|
||||
{
|
||||
if ((i % 2) != 0)
|
||||
{
|
||||
temp = a[i - b[j]];
|
||||
a = replacePos(a, (i - b[j]), a[i]);
|
||||
a = replacePos(a, i, temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
(function() {
|
||||
return dorder(imgsrcs, "6857");
|
||||
return dorder(imgsrcs, "2617");
|
||||
})();
|
||||
"""
|
||||
|
||||
|
@ -381,7 +389,6 @@ var l = "18a72a69a64a13a1a43a3aa42a23a66a26a19a51a54a78a34a17a31a35a15a58a29a61a
|
|||
return result;
|
||||
})();
|
||||
"""
|
||||
|
||||
// Allow destructuring up to 6 items for lists
|
||||
private operator fun <T> List<T>.component6() = get(5)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue