From ce21114713cb3096734e501da87aa5ac115e17ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=92=E7=A0=82=E7=B3=96?= <90336521+lings03@users.noreply.github.com> Date: Wed, 28 May 2025 20:43:28 +0800 Subject: [PATCH] [copy_manga] Allow user to edit copyPlatform (#74) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [copy_manga] Allow user to edit copyPlatform 拷贝连着三天改了三次这参数 * Update version --- copy_manga.js | 18 +++++++++++++++--- index.json | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/copy_manga.js b/copy_manga.js index 1f7cab0..33fb3a3 100644 --- a/copy_manga.js +++ b/copy_manga.js @@ -4,7 +4,7 @@ class CopyManga extends ComicSource { key = "copy_manga" - version = "1.1.7" + version = "1.2.0" minAppVersion = "1.2.1" @@ -14,6 +14,8 @@ class CopyManga extends ComicSource { static defaultCopyVersion = "2.2.9" + static defaultCopyPlatform = "2" + get copyVersion() { return this.loadSetting('version') } @@ -22,6 +24,10 @@ class CopyManga extends ComicSource { return `https://${this.loadSetting('base_url')}` } + get copyPlatform() { + return this.loadSetting('platform') + } + init() { let token = this.loadData("token"); if (!token) { @@ -38,7 +44,7 @@ class CopyManga extends ComicSource { "region": "1", "version": this.copyVersion, "authorization": `Token${token}`, - "platform": "1", + "platform": this.copyPlatform, "umstring": "b4c89ca4104ea9a97750314d791520ac", } // 用于储存 { 作者名 : 英文参数 } @@ -73,7 +79,7 @@ class CopyManga extends ComicSource { "region": "1", "version": this.copyVersion, "authorization": `Token ${token}`, - "platform": "1", + "platform": this.copyPlatform, "umstring": "b4c89ca4104ea9a97750314d791520ac", } return "ok" @@ -812,6 +818,12 @@ class CopyManga extends ComicSource { validator: '^\\d+(?:\\.\\d+)*$', default: CopyManga.defaultCopyVersion, }, + platform: { + title: "平台代号(重启APP生效)", + type: "input", + validator: '^\\d+(?:\\.\\d+)*$', + default: CopyManga.defaultCopyPlatform, + } } /** diff --git a/index.json b/index.json index 91adf89..a75b5a3 100644 --- a/index.json +++ b/index.json @@ -3,7 +3,7 @@ "name": "拷贝漫画", "fileName": "copy_manga.js", "key": "copy_manga", - "version": "1.1.7" + "version": "1.2.0" }, { "name": "Komiic",