diff options
| author | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-09-18 14:56:04 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-09-18 14:56:04 +0300 |
| commit | 59ea2645db827335a0689d2fb7aeeef4e52af52b (patch) | |
| tree | a52caa80571fef4919c3df59a4bceacd60ba6aa6 /web/assets/js/subscription.js | |
| parent | 8c8d280f147ce4e8f604080d1dbf066332e55efc (diff) | |
new: subJsonEnable
after this subEnable by default is true
and subJsonEnable is false
Diffstat (limited to 'web/assets/js/subscription.js')
| -rw-r--r-- | web/assets/js/subscription.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/web/assets/js/subscription.js b/web/assets/js/subscription.js index 2c731be3..0af95890 100644 --- a/web/assets/js/subscription.js +++ b/web/assets/js/subscription.js @@ -101,7 +101,10 @@ if (sj) this.app.subJsonUrl = sj; drawQR(this.app.subUrl); try { - new QRious({ element: document.getElementById('qrcode-subjson'), value: this.app.subJsonUrl || '', size: 220 }); + const elJson = document.getElementById('qrcode-subjson'); + if (elJson && this.app.subJsonUrl) { + new QRious({ element: elJson, value: this.app.subJsonUrl, size: 220 }); + } } catch (e) { /* ignore */ } this._onResize = () => { this.viewportWidth = window.innerWidth; }; window.addEventListener('resize', this._onResize); |
