new: subJsonEnable

after this subEnable by default is true
and subJsonEnable is false
This commit is contained in:
mhsanaei
2025-09-18 13:56:04 +02:00
parent 8c8d280f14
commit 59ea2645db
26 changed files with 97 additions and 32 deletions

View File

@@ -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);