CyberMax-tools commited on
Commit
7608ae8
·
verified ·
1 Parent(s): 48c8dfe

Deploy quotesprig to the hub

Browse files
Files changed (3) hide show
  1. quotesprig/index.html +2 -2
  2. quotesprig/pro.js +8 -8
  3. quotesprig/sw.js +3 -2
quotesprig/index.html CHANGED
@@ -276,7 +276,7 @@
276
  <a href="https://cybermax-tools-cybermax.static.hf.space/menumoor/index.html" target="_blank" rel="noopener">Menumoor: menus</a>
277
  <a href="https://cybermax-tools-cybermax.static.hf.space/sigsprig/index.html" target="_blank" rel="noopener">Sigsprig: email signatures</a>
278
  <a href="https://cybermax-tools-cybermax.static.hf.space/profit-margin-calculator/index.html" target="_blank" rel="noopener">Profit margin calculator</a>
279
- <a href="https://cybermax.cybermax-tools.workers.dev/store/?utm_source=quotesprig&amp;utm_medium=more-from" target="_blank" rel="noopener">CyberMax Store</a>
280
  </div>
281
  <p class="copy">© 2026 CyberMax. All rights reserved. Support: <a href="mailto:cybermax.tools@gmail.com">cybermax.tools@gmail.com</a></p>
282
  </footer>
@@ -287,5 +287,5 @@
287
  <script src="calc.js"></script>
288
  <script src="pdf.js"></script>
289
  <script src="app.js"></script>
290
- <!-- cybermax-count:start --><script>(function(){try{var u="https://data.cybermaxtools.com/v?p="+encodeURIComponent(location.host+location.pathname)+"&r="+encodeURIComponent((document.referrer||"").split("/")[2]||"")+(function(){var q=new URLSearchParams(location.search),s=q.get("utm_source"),t=(q.get("s")||"").toLowerCase().replace(/[^a-z0-9-]/g,"-").slice(0,80);return s?"&us="+encodeURIComponent(s)+"&uc="+encodeURIComponent(q.get("utm_campaign")||""):t?"&us=s&uc="+encodeURIComponent(t):""})();navigator.sendBeacon?navigator.sendBeacon(u):(new Image).src=u}catch(e){}})()</script><!-- cybermax-count:end --></body>
291
  </html>
 
276
  <a href="https://cybermax-tools-cybermax.static.hf.space/menumoor/index.html" target="_blank" rel="noopener">Menumoor: menus</a>
277
  <a href="https://cybermax-tools-cybermax.static.hf.space/sigsprig/index.html" target="_blank" rel="noopener">Sigsprig: email signatures</a>
278
  <a href="https://cybermax-tools-cybermax.static.hf.space/profit-margin-calculator/index.html" target="_blank" rel="noopener">Profit margin calculator</a>
279
+ <a href="https://cybermaxtools.com/store/?utm_source=quotesprig&amp;utm_medium=more-from" target="_blank" rel="noopener">CyberMax Store</a>
280
  </div>
281
  <p class="copy">© 2026 CyberMax. All rights reserved. Support: <a href="mailto:cybermax.tools@gmail.com">cybermax.tools@gmail.com</a></p>
282
  </footer>
 
287
  <script src="calc.js"></script>
288
  <script src="pdf.js"></script>
289
  <script src="app.js"></script>
290
+ </body>
291
  </html>
quotesprig/pro.js CHANGED
@@ -2,8 +2,8 @@
2
  * self-contained). Extends pro.js with several plans (monthly, yearly, one-time) and a re-check for subscriptions.
3
  * Config before this script:
4
  * window.CMX_PRO = { id, name, perks: [..], plans: [{ offer, label, price, per, note, best }], free: "one line" }
5
- * Buy: counted link https://data.cybermax-tools.workers.dev/buy/<offer>?s=app-<id> -> Stripe Payment Link.
6
- * After checkout Stripe sends the buyer to data.cybermax-tools.workers.dev/unlock/<id>?session_id=..., which checks the
7
  * Checkout Session (and, for a subscription, that it is still active) and returns here with #cmx-pro=<session id>.
8
  * The app checks that code once (/unlock/<id>?json=1&session_id=..) and remembers Pro in this browser; it re-checks every
9
  * 3 days, so a cancelled subscription turns off by itself (one tiny request per buyer every 3 days, none for free users).
@@ -13,9 +13,9 @@
13
  "use strict";
14
  var C = window.CMX_PRO || {};
15
  if (!C.id) return;
16
- var DATA = "https://data.cybermax-tools.workers.dev";
17
  var KEY = "cmx-pro:" + C.id;
18
- var SID = /^cs_(live|test)_[A-Za-z0-9]{10,200}$/;
19
  var RECHECK = 3 * 864e5;
20
  var listeners = [];
21
 
@@ -60,7 +60,7 @@
60
 
61
  // Convert kit (funnel beacons, real proof, email capture, phone buy bar), loaded from the CyberMax Store; optional:
62
  // if it can't load (offline), the app and the Pro box work exactly the same.
63
- var KIT = "https://cybermax.cybermax-tools.workers.dev/store/convert.js", kitQ = [];
64
  function conv(fn) {
65
  if (window.CMXConvert) return fn(window.CMXConvert);
66
  kitQ.push(fn);
@@ -99,15 +99,15 @@
99
  el.innerHTML = '<h2>' + esc(C.name) + ' Pro</h2>' + (C.free ? '<p class="cmx-pro-small">Free: ' + esc(C.free) + "</p>" : "") +
100
  "<ul>" + C.perks.map(function (p) { return "<li>" + esc(p) + "</li>"; }).join("") + '</ul><div class="cmx-plans">' + plans +
101
  '</div><p class="cmx-pro-small">Secure Stripe checkout. Pro turns on the moment you pay; no account needed.' + (subs ? " Subscriptions cancel any time from your receipt email." : " One payment, no subscription.") +
102
- ' 14-day promise: if it doesn\'t work as described, we fix it or refund you in full (<a href="https://cybermax.cybermax-tools.workers.dev/terms#payments" target="_blank" rel="noopener">terms</a>). Questions: <a href="mailto:cybermax.tools@gmail.com">cybermax.tools@gmail.com</a></p><div class="cmx-pro-proof"></div><div class="cmx-pro-cap"></div>' +
103
- '<details><summary>Already bought Pro?</summary><form id="cmx-pro-form"><label>Unlock code <input id="cmx-pro-code" autocomplete="off" placeholder="cs_live_…"></label> <button class="btn ghost" type="submit">Unlock</button></form></details><p id="cmx-pro-msg" class="cmx-pro-small" aria-live="polite"></p>';
104
  Array.prototype.forEach.call(el.querySelectorAll("a.cmx-plan"), function (a) { a.addEventListener("click", function () { conv(function (K) { K.event("upgrade-click", C.id); }); }); });
105
  conv(function (K) {
106
  K.proof(el.querySelector(".cmx-pro-proof"), C.id);
107
  K.capture(el.querySelector(".cmx-pro-cap"), { list: "weekly-" + C.id, src: "app-" + C.id, label: "Not ready for Pro? Email me " + C.name + " tips and new features (about once a week)" });
108
  });
109
  var f = document.getElementById("cmx-pro-form");
110
- if (f) f.onsubmit = function (e) { e.preventDefault(); var c = (document.getElementById("cmx-pro-code").value || "").trim(); if (SID.test(c)) unlock(c); else toast("Paste the code from your receipt page (it starts with cs_live_)."); };
111
  }
112
 
113
  function apply() {
 
2
  * self-contained). Extends pro.js with several plans (monthly, yearly, one-time) and a re-check for subscriptions.
3
  * Config before this script:
4
  * window.CMX_PRO = { id, name, perks: [..], plans: [{ offer, label, price, per, note, best }], free: "one line" }
5
+ * Buy: counted link https://data.cybermaxtools.com/buy/<offer>?s=app-<id> -> Stripe Payment Link.
6
+ * After checkout Stripe sends the buyer to data.cybermaxtools.com/unlock/<id>?session_id=..., which checks the
7
  * Checkout Session (and, for a subscription, that it is still active) and returns here with #cmx-pro=<session id>.
8
  * The app checks that code once (/unlock/<id>?json=1&session_id=..) and remembers Pro in this browser; it re-checks every
9
  * 3 days, so a cancelled subscription turns off by itself (one tiny request per buyer every 3 days, none for free users).
 
13
  "use strict";
14
  var C = window.CMX_PRO || {};
15
  if (!C.id) return;
16
+ var DATA = "https://data.cybermaxtools.com";
17
  var KEY = "cmx-pro:" + C.id;
18
+ var SID = /^(cs_(live|test)_[A-Za-z0-9]{10,200}|[A-Z0-9]{8}-[A-Z0-9]{8}-[A-Z0-9]{8}-[A-Z0-9]{8})$/i; // Stripe order code or Gumroad licence key
19
  var RECHECK = 3 * 864e5;
20
  var listeners = [];
21
 
 
60
 
61
  // Convert kit (funnel beacons, real proof, email capture, phone buy bar), loaded from the CyberMax Store; optional:
62
  // if it can't load (offline), the app and the Pro box work exactly the same.
63
+ var KIT = "https://cybermaxtools.com/store/convert.js", kitQ = [];
64
  function conv(fn) {
65
  if (window.CMXConvert) return fn(window.CMXConvert);
66
  kitQ.push(fn);
 
99
  el.innerHTML = '<h2>' + esc(C.name) + ' Pro</h2>' + (C.free ? '<p class="cmx-pro-small">Free: ' + esc(C.free) + "</p>" : "") +
100
  "<ul>" + C.perks.map(function (p) { return "<li>" + esc(p) + "</li>"; }).join("") + '</ul><div class="cmx-plans">' + plans +
101
  '</div><p class="cmx-pro-small">Secure Stripe checkout. Pro turns on the moment you pay; no account needed.' + (subs ? " Subscriptions cancel any time from your receipt email." : " One payment, no subscription.") +
102
+ ' 14-day promise: if it doesn\'t work as described, we fix it or refund you in full (<a href="https://cybermaxtools.com/terms#payments" target="_blank" rel="noopener">terms</a>). Questions: <a href="mailto:cybermax.tools@gmail.com">cybermax.tools@gmail.com</a></p><div class="cmx-pro-proof"></div><div class="cmx-pro-cap"></div>' +
103
+ '<details><summary>Already bought Pro?</summary><form id="cmx-pro-form"><label>Unlock code <input id="cmx-pro-code" autocomplete="off" placeholder="cs_live_… or Gumroad licence key"></label> <button class="btn ghost" type="submit">Unlock</button></form></details><p id="cmx-pro-msg" class="cmx-pro-small" aria-live="polite"></p>';
104
  Array.prototype.forEach.call(el.querySelectorAll("a.cmx-plan"), function (a) { a.addEventListener("click", function () { conv(function (K) { K.event("upgrade-click", C.id); }); }); });
105
  conv(function (K) {
106
  K.proof(el.querySelector(".cmx-pro-proof"), C.id);
107
  K.capture(el.querySelector(".cmx-pro-cap"), { list: "weekly-" + C.id, src: "app-" + C.id, label: "Not ready for Pro? Email me " + C.name + " tips and new features (about once a week)" });
108
  });
109
  var f = document.getElementById("cmx-pro-form");
110
+ if (f) f.onsubmit = function (e) { e.preventDefault(); var c = (document.getElementById("cmx-pro-code").value || "").trim(); if (SID.test(c)) unlock(c); else toast("Paste the code from your receipt page (it starts with cs_live_) or your Gumroad licence key."); };
111
  }
112
 
113
  function apply() {
quotesprig/sw.js CHANGED
@@ -1,7 +1,8 @@
1
  /* Quotesprig offline cache. (c) 2026 CyberMax. All rights reserved.
2
  * Network first for pages (updates arrive quickly), cache first for same-scope static files. */
3
- var CACHE = "quotesprig-v2";
4
- var FILES = ["./", "index.html", "style.css", "pro.js", "calc.js", "pdf.js", "app.js", "manifest.webmanifest", "icon.svg", "icon-192.png", "icon-512.png"];
 
5
  self.addEventListener("install", function (e) {
6
  e.waitUntil(caches.open(CACHE).then(function (c) { return c.addAll(FILES); }).then(function () { return self.skipWaiting(); }));
7
  });
 
1
  /* Quotesprig offline cache. (c) 2026 CyberMax. All rights reserved.
2
  * Network first for pages (updates arrive quickly), cache first for same-scope static files. */
3
+ /* 16 Oct 2026: './' is not precached: the Hugging Face static host answers 404 for a folder URL, which made the whole install fail (no offline). Navigations fall back to index.html. */
4
+ var CACHE = "quotesprig-v3";
5
+ var FILES = ["index.html", "style.css", "pro.js", "calc.js", "pdf.js", "app.js", "manifest.webmanifest", "icon.svg", "icon-192.png", "icon-512.png"];
6
  self.addEventListener("install", function (e) {
7
  e.waitUntil(caches.open(CACHE).then(function (c) { return c.addAll(FILES); }).then(function () { return self.skipWaiting(); }));
8
  });