Skip to content

Commit 217003e

Browse files
修复了排序错误.
1 parent e001905 commit 217003e

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

index.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ async function getMangaData(dataPageUrl) {
8888

8989
for (var manga of chapterListResponse.results.list) {
9090
var comic = {
91-
title: manga.name,
91+
title: '[' + manga.name + '][' + manga.datetime_created + ']',
9292
url: 'https://www.mangacopy.com/comic/' + seasonIdMatch[1] + '/chapter/' + manga.uuid
9393
}
9494
result.chapterList.push(comic);
@@ -111,15 +111,21 @@ async function getChapterImageList(chapterUrl) {
111111
});
112112
const response = JSON.parse(rawResponse);
113113
var result = [];
114-
for (manga of response.results.chapter.contents) {
114+
for (var i = 0; i < response.results.chapter.words.length; i++) {
115115
result.push({
116-
url: manga.url,
116+
url: response.results.chapter.contents[i].url,
117+
index: response.results.chapter.words[i],
117118
width: 1,
118119
height: 1
119120
});
120121
}
122+
result.sort(function(a, b) {
123+
return a.index - b.index;
124+
});
125+
for (var i = 0; i < result.length; i++) {
126+
delete result[i].index;
127+
}
121128
window.Rulia.endWithResult(result);
122-
123129
}
124130

125131
async function getImageUrl(path) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@rulia/CopyManga",
33
"title": "拷贝漫画",
44
"description": "拷贝漫画插件.",
5-
"version": "0.0.1",
5+
"version": "0.0.2",
66
"author": "LittleStar_OuO",
77
"tags": ["Copy", "Manga","CopyManga"],
88
"homepage": "https://github.com/LittleStar-OuO/plugin.CopyManga"

0 commit comments

Comments
 (0)