qurantathbit 1.0.24 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.html CHANGED
@@ -93,7 +93,8 @@ body {
93
93
  <link id="-gd-engine-icon" rel="icon" type="image/png" href="index.icon.png" />
94
94
  <link rel="apple-touch-icon" href="index.apple-touch-icon.png"/>
95
95
  <link rel="manifest" href="index.manifest.json">
96
- <style>body{background-color:#faf5ed}#status::before{content:'QuranTathbit';display:block;font:700 30px/1.25 system-ui,sans-serif;color:#14513d;margin-bottom:14px}#status::after{content:'A calm app for memorising the Qur’an';display:block;font:400 13px/1.5 system-ui,sans-serif;color:#5c6b62;margin-top:18px}#status-progress{-webkit-appearance:none;appearance:none;border:0;height:10px;width:min(60vw,420px);border-radius:99px;overflow:hidden;background:#e6dfce}#status-progress::-webkit-progress-bar{background:#e6dfce;border-radius:99px}#status-progress::-webkit-progress-value{background:#1e6b52;border-radius:99px;transition:width .25s ease-out}#status-progress::-moz-progress-bar{background:#1e6b52;border-radius:99px}</style><script>(function(){if(typeof window.fetch!=='function'||typeof DecompressionStream==='undefined'){return}var nativeFetch=window.fetch.bind(window);function wasmUrl(u){var i=u.indexOf('index.wasm');if(i===-1){return false}var before=(i===0)?'':u.charAt(i-1);var after=u.charAt(i+10);return(before===''||before==='/')&&(after===''||after==='?'||after==='#')}window.fetch=function(input,init){var url=(typeof input==='string')?input:((input&&typeof input.url==='string')?input.url:'');if(!wasmUrl(url)){return nativeFetch(input,init)}return nativeFetch(url.replace('index.wasm','index.wasm.gz'),{credentials:'same-origin'}).then(function(resp){if(!resp.ok){throw new Error('gz missing')}var enc=(resp.headers.get('content-encoding')||'').toLowerCase();if(enc.indexOf('gzip')!==-1){return resp}return new Response(resp.body.pipeThrough(new DecompressionStream('gzip')),{status:200,headers:{'content-type':'application/wasm'}})}).catch(function(){return nativeFetch(input,init)})}})();</script><script>/*qt-browser-keys*/(function(){'use strict';function r(e){var k=e.key;if(!k){return false}var key=(k.length===1)?k.toLowerCase():k;var c=e.ctrlKey||e.metaKey;if(key==='F5'||key==='F6'||key==='F11'||key==='F12'){return true}if(c&&!e.altKey&&key==='v'){return true}if(c&&!e.altKey&&(key==='r'||key==='u'||key==='l'||key==='f'||key==='g'||key==='d'||key==='p'||key==='s'||key==='t'||key==='n'||key==='w')){return true}if(c&&e.shiftKey&&(key==='i'||key==='j'||key==='c'||key==='k')){return true}if(c&&(key==='+'||key==='='||key==='-'||key==='0')){return true}if(e.altKey&&(key==='d'||key==='ArrowLeft'||key==='ArrowRight')){return true}return false}function g(e){if(r(e)){e.stopImmediatePropagation();e.stopPropagation()}}window.addEventListener('keydown',g,true);window.addEventListener('keyup',g,true)})();</script><meta name='apple-mobile-web-app-capable' content='yes'><meta name='mobile-web-app-capable' content='yes'><meta name='apple-mobile-web-app-title' content='QuranTathbit'><script>/*qt-update-watch*/(function(){'use strict';if(!('serviceWorker' in navigator)){return}var tries=0;function begin(){navigator.serviceWorker.getRegistration().then(function(reg){if(!reg){if(tries<15){tries+=1;setTimeout(begin,1000)}return}var look=function(){reg.update().catch(function(){})};setInterval(look,900000);document.addEventListener('visibilitychange',function(){if(document.visibilityState==='visible'){look()}})}).catch(function(){})}begin()})();</script><script>/*qt-paste-bridge*/(function(){'use strict';window.__qtPasteInstall=window.__qtPasteInstall||{install:function(bridge){window.__qtPasteBridge=bridge}};window.addEventListener('paste',function(e){var t=e.target;if(t&&(t.tagName==='INPUT'||t.tagName==='TEXTAREA')){return}if(!window.__qtPasteBridge){return}var d=e.clipboardData||window.clipboardData;if(!d){return}var text=d.getData('text/plain');if(text){try{window.__qtPasteBridge(text)}catch(err){}}},false)})();<script>/*qt-zip-bridge*/(function(){'use strict';window.__qtZipInstall=window.__qtZipInstall||{install:function(bridge){window.__qtZipBridge=bridge}};window.__qtZipPick=function(){if(!window.__qtZipBridge){return}var i=document.createElement('input');i.type='file';i.accept='.zip,application/zip';i.onchange=function(){var f=i.files&&i.files[0];if(!f){return}var r=new FileReader();r.onload=function(){var s=String(r.result);var c=s.indexOf(',');if(c===-1){return}try{window.__qtZipBridge('import:'+f.name+':'+s.slice(c+1))}catch(err){}};r.readAsDataURL(f)};i.click()}})();<script>/*qt-webgl2-guard*/(function(){'use strict';var ok=true;try{if(typeof WebGL2RenderingContext==='undefined'){ok=false}else{var t=document.createElement('canvas');if(!t.getContext('webgl2')){ok=false}}}catch(e){ok=false}if(ok){return}window.__qtWebGL2Missing=true;if(!window.fetch){window.fetch=function(){return Promise.reject(new Error('fetch unavailable'))}}else{var nf=window.fetch.bind(window);window.fetch=function(input,init){var url=(typeof input==='string')?input:((input&&typeof input.url==='string')?input.url:'');if(url.indexOf('index.wasm')!==-1){return Promise.reject(new Error('WebGL2 unavailable on this device'))}return nf(input,init)}};function say(){var n=document.getElementById('status-notice');var p=document.getElementById('status-progress');if(p){p.style.display='none'}if(n){n.textContent='This browser has no WebGL2, which the web app needs. The Android app runs on this device instead. | این مرورگر WebGL2 ندارد؛ برنامهٔ اندروید روی همین دستگاه اجرا میشود.';n.style.display='block'}}if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',say)}else{say()}})();</script>
96
+ <style>body{background-color:#faf5ed}#status::before{content:'QuranTathbit';display:block;font:700 30px/1.25 system-ui,sans-serif;color:#14513d;margin-bottom:14px}#status::after{content:'A calm app for memorising the Qur’an';display:block;font:400 13px/1.5 system-ui,sans-serif;color:#5c6b62;margin-top:18px}#status-progress{-webkit-appearance:none;appearance:none;border:0;height:10px;width:min(60vw,420px);border-radius:99px;overflow:hidden;background:#e6dfce}#status-progress::-webkit-progress-bar{background:#e6dfce;border-radius:99px}#status-progress::-webkit-progress-value{background:#1e6b52;border-radius:99px;transition:width .25s ease-out}#status-progress::-moz-progress-bar{background:#1e6b52;border-radius:99px}</style><script>(function(){if(typeof window.fetch!=='function'||typeof DecompressionStream==='undefined'){return}var nativeFetch=window.fetch.bind(window);function wasmUrl(u){var i=u.indexOf('index.wasm');if(i===-1){return false}var before=(i===0)?'':u.charAt(i-1);var after=u.charAt(i+10);return(before===''||before==='/')&&(after===''||after==='?'||after==='#')}window.fetch=function(input,init){var url=(typeof input==='string')?input:((input&&typeof input.url==='string')?input.url:'');if(!wasmUrl(url)){return nativeFetch(input,init)}return nativeFetch(url.replace('index.wasm','index.wasm.gz'),{credentials:'same-origin'}).then(function(resp){if(!resp.ok){throw new Error('gz missing')}var enc=(resp.headers.get('content-encoding')||'').toLowerCase();if(enc.indexOf('gzip')!==-1){return resp}return new Response(resp.body.pipeThrough(new DecompressionStream('gzip')),{status:200,headers:{'content-type':'application/wasm'}})}).catch(function(){return nativeFetch(input,init)})}})();</script><script>/*qt-browser-keys*/(function(){'use strict';function r(e){var k=e.key;if(!k){return false}var key=(k.length===1)?k.toLowerCase():k;var c=e.ctrlKey||e.metaKey;if(key==='F5'||key==='F6'||key==='F11'||key==='F12'){return true}if(c&&!e.altKey&&key==='v'){return true}if(c&&!e.altKey&&(key==='r'||key==='u'||key==='l'||key==='f'||key==='g'||key==='d'||key==='p'||key==='s'||key==='t'||key==='n'||key==='w')){return true}if(c&&e.shiftKey&&(key==='i'||key==='j'||key==='c'||key==='k')){return true}if(c&&(key==='+'||key==='='||key==='-'||key==='0')){return true}if(e.altKey&&(key==='d'||key==='ArrowLeft'||key==='ArrowRight')){return true}return false}function g(e){if(r(e)){e.stopImmediatePropagation();e.stopPropagation()}}window.addEventListener('keydown',g,true);window.addEventListener('keyup',g,true)})();</script><meta name='apple-mobile-web-app-capable' content='yes'><meta name='mobile-web-app-capable' content='yes'><meta name='apple-mobile-web-app-title' content='QuranTathbit'><script>/*qt-update-watch*/(function(){'use strict';if(!('serviceWorker' in navigator)){return}var tries=0;var reloaded=false;function ask(){navigator.serviceWorker.getRegistration().then(function(reg){if(reg&&reg.waiting){reg.waiting.postMessage('claim')}}).catch(function(){})}function begin(){navigator.serviceWorker.getRegistration().then(function(reg){if(!reg){if(tries<15){tries+=1;setTimeout(begin,1000)}return}var look=function(){reg.update().catch(function(){})};setInterval(look,900000);document.addEventListener('visibilitychange',function(){if(document.visibilityState==='visible'){look()}});ask()}).catch(function(){})}begin();var held=!!(navigator.serviceWorker.controller);navigator.serviceWorker.addEventListener('controllerchange',function(){if(!held||reloaded){return}reloaded=true;setTimeout(function(){try{location.reload()}catch(e){}},120)})})();</script><script>/*qt-paste-bridge*/(function(){'use strict';window.__qtPasteInstall=window.__qtPasteInstall||{install:function(bridge){window.__qtPasteBridge=bridge}};window.addEventListener('paste',function(e){var t=e.target;if(t&&(t.tagName==='INPUT'||t.tagName==='TEXTAREA')){return}if(!window.__qtPasteBridge){return}var d=e.clipboardData||window.clipboardData;if(!d){return}var text=d.getData('text/plain');if(text){try{window.__qtPasteBridge(text)}catch(err){}}},false)})();<script>/*qt-zip-bridge*/(function(){'use strict';window.__qtZipInstall=window.__qtZipInstall||{install:function(bridge){window.__qtZipBridge=bridge}};window.__qtZipPick=function(){if(!window.__qtZipBridge){return}var i=document.createElement('input');i.type='file';i.accept='.zip,application/zip';i.onchange=function(){var f=i.files&&i.files[0];if(!f){return}var r=new FileReader();r.onload=function(){var s=String(r.result);var c=s.indexOf(',');if(c===-1){return}try{window.__qtZipBridge('import:'+f.name+':'+s.slice(c+1))}catch(err){}};r.readAsDataURL(f)};i.click()}})();<script>/*qt-webgl2-guard*/(function(){'use strict';var ok=true;try{if(typeof WebGL2RenderingContext==='undefined'){ok=false}else{var t=document.createElement('canvas');if(!t.getContext('webgl2')){ok=false}}}catch(e){ok=false}if(ok){return}window.__qtWebGL2Missing=true;if(!window.fetch){window.fetch=function(){return Promise.reject(new Error('fetch unavailable'))}}else{var nf=window.fetch.bind(window);window.fetch=function(input,init){var url=(typeof input==='string')?input:((input&&typeof input.url==='string')?input.url:'');if(url.indexOf('index.wasm')!==-1){return Promise.reject(new Error('WebGL2 unavailable on this device'))}return nf(input,init)}};function say(){var n=document.getElementById('status-notice');var p=document.getElementById('status-progress');if(p){p.style.display='none'}if(n){n.textContent='This browser has no WebGL2, which the web app needs. The Android app runs on this device instead. | این مرورگر WebGL2 ندارد؛ برنامهٔ اندروید روی همین دستگاه اجرا میشود.';n.style.display='block'}}if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',say)}else{say()}})();</script><script>/*qt-boot-watch*/(function(){'use strict';var said=false;var told=false;function lines(en,fa,why){if(why){why=String(why).split('|').join(' ').split('
97
+ ').join(' ')}return (why?(en+': '+why+'. '):en)+('| '+(why?(fa+': '+why+'. '):fa))}function place(){var n=document.getElementById('status-notice');var s=document.getElementById('status');if(!n||!s){return null}if(s.style.visibility!=='visible'){s.style.visibility='visible'}return n}function say(en,fa,why){if(said||window.__qtWebGL2Missing){return}said=true;var n=place();if(!n){return}var p=document.getElementById('status-progress');if(p){p.style.display='none'}while(n.lastChild){n.removeChild(n.lastChild)}var t=lines(en,fa,why).split('|');for(var i=0;i<t.length;i++){n.appendChild(document.createTextNode(t[i]));n.appendChild(document.createElement('br'))}n.style.display='block'}function note(){if(told||said||window.__qtWebGL2Missing){return}told=true;var n=place();if(!n){return}while(n.lastChild){n.removeChild(n.lastChild)}var t=lines('Still loading after a long wait. The connection may be slow, or this browser may be too old for the web app. Reload to try again; the Android app always runs on this device.','بارگیری خیلی طول کشیده است. ممکن است اینترنت کند باشد یا این مرورگر برای نسخهٔ وب قدیمی باشد. بازکردن دوباره را امتحان کنید؛ برنامهٔ اندروید همیشه روی همین دستگاه اجرا میشود.','').split('|');for(var i=0;i<t.length;i++){n.appendChild(document.createTextNode(t[i]));n.appendChild(document.createElement('br'))}n.style.display='block'}window.addEventListener('error',function(e){var why=(e&&e.message)?e.message:'';say('The web app could not start in this browser','برنامهٔ وب در این مرورگر باز نشد',why)},false);window.addEventListener('unhandledrejection',function(e){var r=(e&&e.reason)?e.reason:'';var why=(r&&r.message)?r.message:r;say('The web app could not finish loading','برنامهٔ وب بارگیری را تمام نکرد',why)},false);var last=null;var quiet=0;setInterval(function(){if(told||said||window.__qtWebGL2Missing){return}var bar=document.getElementById('status-progress');var s=document.getElementById('status');if(!bar||!s){return}if(s.style.visibility!=='visible'){quiet=0;return}var v=bar.hasAttribute('value')?Number(bar.getAttribute('value')):-1;if(v!==last){last=v;quiet=0;return}quiet+=5;if(quiet>=45){note()}},5000)})();</script>
97
98
  </head>
98
99
  <body>
99
100
  <canvas id="canvas">
@@ -112,7 +113,7 @@ body {
112
113
 
113
114
  <script src="index.js"></script>
114
115
  <script>
115
- const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"emscriptenPoolSize":8,"ensureCrossOriginIsolationHeaders":true,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":1444716,"index.wasm":39514754},"focusCanvas":true,"gdextensionLibs":[],"godotPoolSize":4,"serviceWorker":"index.service.worker.js"};
116
+ const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"emscriptenPoolSize":8,"ensureCrossOriginIsolationHeaders":true,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":1450936,"index.wasm":39514754},"focusCanvas":true,"gdextensionLibs":[],"godotPoolSize":4,"serviceWorker":"index.service.worker.js"};
116
117
  const GODOT_THREADS_ENABLED = false;
117
118
  const engine = new Engine(GODOT_CONFIG);
118
119
 
package/index.pck CHANGED
Binary file
@@ -4,7 +4,7 @@
4
4
  // Incrementing CACHE_VERSION will kick off the install event and force
5
5
  // previously cached resources to be updated from the network.
6
6
  /** @type {string} */
7
- const CACHE_VERSION = '1792254071|2656515';
7
+ const CACHE_VERSION = '1792266988|2702587';
8
8
  /** @type {string} */
9
9
  const CACHE_PREFIX = 'QuranTathbit-sw-cache-';
10
10
  const CACHE_NAME = CACHE_PREFIX + CACHE_VERSION;
@@ -21,7 +21,7 @@ const CACHEABLE_FILES = ["index.wasm","index.pck"];
21
21
  const FULL_CACHE = CACHED_FILES.concat(CACHEABLE_FILES);
22
22
 
23
23
  self.addEventListener('install', (event) => {
24
- event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.addAll(CACHED_FILES)));
24
+ event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.addAll(CACHED_FILES)).then(() => self.skipWaiting()));
25
25
  });
26
26
 
27
27
  self.addEventListener('activate', (event) => {
@@ -33,7 +33,7 @@ self.addEventListener('activate', (event) => {
33
33
  ).then(function () {
34
34
  // Enable navigation preload if available.
35
35
  return ('navigationPreload' in self.registration) ? self.registration.navigationPreload.enable() : Promise.resolve();
36
- }));
36
+ }).then(() => self.clients.claim()));
37
37
  });
38
38
 
39
39
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qurantathbit",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "A quiet companion for keeping the Qur'an close — one deck, one card at a time, with your own GitHub as the cloud. Web build served from any static host or `npx qurantathbit`.",
5
5
  "license": "MIT",
6
6
  "repository": {