Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'web/assets/js/subscription.js')
-rw-r--r--web/assets/js/subscription.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/web/assets/js/subscription.js b/web/assets/js/subscription.js
index d08bfd28..aa09e1c4 100644
--- a/web/assets/js/subscription.js
+++ b/web/assets/js/subscription.js
@@ -7,6 +7,7 @@
const data = {
sId: el.getAttribute('data-sid') || '',
+ enabled: (el.getAttribute('data-enabled') || '').toLowerCase() === 'true',
subUrl: el.getAttribute('data-sub-url') || '',
subJsonUrl: el.getAttribute('data-subjson-url') || '',
subClashUrl: el.getAttribute('data-subclash-url') || '',
@@ -128,9 +129,10 @@
},
isActive() {
const now = Date.now();
+ const enabledOk = this.app.enabled;
const expiryOk = !this.app.expireMs || this.app.expireMs >= now;
const trafficOk = !this.app.totalByte || (this.app.uploadByte + this.app.downloadByte) <= this.app.totalByte;
- return expiryOk && trafficOk;
+ return enabledOk && expiryOk && trafficOk;
},
shadowrocketUrl() {
const rawUrl = this.app.subUrl + '?flag=shadowrocket';