From d926a38972d0db66832f3ad91d14c6b638b47e41 Mon Sep 17 00:00:00 2001 From: O2bmm Date: Sat, 3 Aug 2024 06:31:49 +0800 Subject: [PATCH] onlineServiceAddress --- _locales/en/messages.json | 6 ++++++ _locales/zh_CN/messages.json | 6 ++++++ _locales/zh_TW/messages.json | 6 ++++++ css/options.css | 14 +++++++++----- js/init.js | 10 ++++++++-- options.html | 12 +++++++++++- 6 files changed, 46 insertions(+), 8 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index b155e35f..30453996 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -809,5 +809,11 @@ }, "invokeApp": { "message": "Invoke application" + }, + "onlineServiceAddress": { + "message": "Online Service Address" + }, + "withinChina": { + "message": "Within China" } } \ No newline at end of file diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index aa6f3a10..894977d4 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -809,5 +809,11 @@ }, "invokeApp": { "message": "调用程序" + }, + "onlineServiceAddress": { + "message": "在线服务地址" + }, + "withinChina": { + "message": "中国境内" } } \ No newline at end of file diff --git a/_locales/zh_TW/messages.json b/_locales/zh_TW/messages.json index d3867706..1d0a552b 100644 --- a/_locales/zh_TW/messages.json +++ b/_locales/zh_TW/messages.json @@ -809,5 +809,11 @@ }, "invokeApp": { "message": "呼叫應用" + }, + "onlineServiceAddress": { + "message": "在線服務地址" + }, + "withinChina": { + "message": "中國境內" } } \ No newline at end of file diff --git a/css/options.css b/css/options.css index 47b1db08..e9f3b357 100644 --- a/css/options.css +++ b/css/options.css @@ -5,7 +5,8 @@ body { } .wrapper { margin: 0 auto; - width: 640px; + /* width: 640px; */ + width: 45rem; } /* .wrapper input { margin-left: 10px; @@ -123,6 +124,9 @@ input.regex { .item .switch { margin-right: 50px; } +.item .switchSelect{ + margin-right: 85px; +} .optionsTitle { margin-top: 20px; } @@ -237,8 +241,8 @@ textarea { #PlayerTemplate { width: 200px; } -#autoClearMode { - width: 100px; +.select { + width: 8rem; } #errorTsList p { color: red; @@ -354,9 +358,9 @@ textarea { .m3u8DL{ margin-right: 70px !important; } -.m3u8DL #m3u8dl{ +/* .m3u8DL #m3u8dl{ width: 8rem; -} +} */ .break-all { word-break: break-all; } diff --git a/js/init.js b/js/init.js index 6660fcdd..c43fadc7 100644 --- a/js/init.js +++ b/js/init.js @@ -118,6 +118,8 @@ G.OptionLists = { M3u8StreamSaver: false, M3u8Ffmpeg: true, M3u8AutoClose: false, + // 第三方服务地址 + onlineServiceAddress: 0, }; // 本地储存的配置 G.LocalVar = { @@ -150,11 +152,15 @@ G.scriptList.set("webrtc.js", { key: "webrtc", refresh: true, allFrames: true, w G.ffmpegConfig = { tab: 0, version: 1, - url: "https://ffmpeg.bmmmd.com/", + get url() { + return G.onlineServiceAddress == 0 ? "https://ffmpeg.bmmmd.com/" : "https://ffmpeg2.bmmmd.com/"; + } } // streamSaver 边下边存 G.streamSaverConfig = { - url: "https://stream.bmmmd.com/mitm.html" + get url() { + return G.onlineServiceAddress == 0 ? "https://stream.bmmmd.com/mitm.html" : "https://stream2.bmmmd.com/mitm.html"; + } } // 正则预编译 diff --git a/options.html b/options.html index f753fe53..91b6fbf8 100644 --- a/options.html +++ b/options.html @@ -530,7 +530,7 @@

-
+
+ + + +
+
+