Spaces:
Running
Running
Deploy honeyfold to the hub
Browse files- honeyfold/index.html +2 -2
- honeyfold/pro.js +6 -6
- honeyfold/sw.js +4 -3
honeyfold/index.html
CHANGED
|
@@ -84,7 +84,7 @@
|
|
| 84 |
<a href="https://cybermax-tools-cybermax.static.hf.space/profit-margin-calculator/index.html" target="_blank" rel="noopener">Profit Margin Calculator</a>
|
| 85 |
<a href="https://cybermax-tools-cybermax.static.hf.space/salary-to-hourly-calculator/index.html" target="_blank" rel="noopener">Salary to Hourly Calculator</a>
|
| 86 |
<a href="https://huggingface.co/spaces/CyberMax-tools/cybermax" target="_blank" rel="noopener">All CyberMax tools</a>
|
| 87 |
-
<a href="https://
|
| 88 |
</div>
|
| 89 |
<div class="copy">© 2026 CyberMax. All rights reserved.</div>
|
| 90 |
</footer>
|
|
@@ -100,5 +100,5 @@
|
|
| 100 |
<script src="pro.js"></script>
|
| 101 |
<script src="core.js"></script>
|
| 102 |
<script src="game.js"></script>
|
| 103 |
-
<
|
| 104 |
</html>
|
|
|
|
| 84 |
<a href="https://cybermax-tools-cybermax.static.hf.space/profit-margin-calculator/index.html" target="_blank" rel="noopener">Profit Margin Calculator</a>
|
| 85 |
<a href="https://cybermax-tools-cybermax.static.hf.space/salary-to-hourly-calculator/index.html" target="_blank" rel="noopener">Salary to Hourly Calculator</a>
|
| 86 |
<a href="https://huggingface.co/spaces/CyberMax-tools/cybermax" target="_blank" rel="noopener">All CyberMax tools</a>
|
| 87 |
+
<a href="https://cybermaxtools.com/store/?utm_source=honeyfold&utm_medium=more-from" target="_blank" rel="noopener">CyberMax Store · paid products, API plans & bundles</a>
|
| 88 |
</div>
|
| 89 |
<div class="copy">© 2026 CyberMax. All rights reserved.</div>
|
| 90 |
</footer>
|
|
|
|
| 100 |
<script src="pro.js"></script>
|
| 101 |
<script src="core.js"></script>
|
| 102 |
<script src="game.js"></script>
|
| 103 |
+
</body>
|
| 104 |
</html>
|
honeyfold/pro.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
/* CyberMax Pro unlock for static web apps (copied into each product's web/ folder; each product stays self-contained).
|
| 2 |
* Config before this script: window.CMX_PRO = { id, name, price, perks: [..], offer }.
|
| 3 |
-
* Buy: counted link https://data.
|
| 4 |
-
* After checkout Stripe sends the buyer to data.
|
| 5 |
* Checkout Session with Stripe and returns here with #cmx-pro=<session id>. The app re-checks that code once
|
| 6 |
* (/unlock/<id>?session_id=..&json=1) and remembers Pro in this browser. The same code (shown on the receipt page and
|
| 7 |
* in the Pro box) unlocks Pro on another device. No account, no tracking. */
|
|
@@ -9,9 +9,9 @@
|
|
| 9 |
"use strict";
|
| 10 |
var C = window.CMX_PRO || {};
|
| 11 |
if (!C.id) return;
|
| 12 |
-
var DATA = "https://data.
|
| 13 |
var KEY = "cmx-pro:" + C.id;
|
| 14 |
-
var SID = /^cs_(live|test)_[A-Za-z0-9]{10,200}$/;
|
| 15 |
var listeners = [];
|
| 16 |
|
| 17 |
function get() { try { return JSON.parse(localStorage.getItem(KEY) || "null"); } catch (e) { return null; } }
|
|
@@ -63,9 +63,9 @@
|
|
| 63 |
} else {
|
| 64 |
el.innerHTML = '<h2>' + esc(C.name) + ' Pro, ' + esc(C.price) + ' once</h2><ul>' + C.perks.map(function (p) { return "<li>" + esc(p) + "</li>"; }).join("") +
|
| 65 |
'</ul><p><a class="btn" id="cmx-pro-buy" href="' + buy + '" rel="nofollow">Get Pro for ' + esc(C.price) + '</a> <span class="cmx-pro-small">One payment, no subscription, secure Stripe checkout. Everything free stays free.</span></p>' +
|
| 66 |
-
'<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>';
|
| 67 |
var f = document.getElementById("cmx-pro-form");
|
| 68 |
-
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_)."); };
|
| 69 |
}
|
| 70 |
}
|
| 71 |
|
|
|
|
| 1 |
/* CyberMax Pro unlock for static web apps (copied into each product's web/ folder; each product stays self-contained).
|
| 2 |
* Config before this script: window.CMX_PRO = { id, name, price, perks: [..], offer }.
|
| 3 |
+
* Buy: counted link https://data.cybermaxtools.com/buy/<offer>?s=app-<id> -> Stripe Payment Link (one-time).
|
| 4 |
+
* After checkout Stripe sends the buyer to data.cybermaxtools.com/unlock/<id>?session_id=..., which checks the
|
| 5 |
* Checkout Session with Stripe and returns here with #cmx-pro=<session id>. The app re-checks that code once
|
| 6 |
* (/unlock/<id>?session_id=..&json=1) and remembers Pro in this browser. The same code (shown on the receipt page and
|
| 7 |
* in the Pro box) unlocks Pro on another device. No account, no tracking. */
|
|
|
|
| 9 |
"use strict";
|
| 10 |
var C = window.CMX_PRO || {};
|
| 11 |
if (!C.id) return;
|
| 12 |
+
var DATA = "https://data.cybermaxtools.com";
|
| 13 |
var KEY = "cmx-pro:" + C.id;
|
| 14 |
+
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
|
| 15 |
var listeners = [];
|
| 16 |
|
| 17 |
function get() { try { return JSON.parse(localStorage.getItem(KEY) || "null"); } catch (e) { return null; } }
|
|
|
|
| 63 |
} else {
|
| 64 |
el.innerHTML = '<h2>' + esc(C.name) + ' Pro, ' + esc(C.price) + ' once</h2><ul>' + C.perks.map(function (p) { return "<li>" + esc(p) + "</li>"; }).join("") +
|
| 65 |
'</ul><p><a class="btn" id="cmx-pro-buy" href="' + buy + '" rel="nofollow">Get Pro for ' + esc(C.price) + '</a> <span class="cmx-pro-small">One payment, no subscription, secure Stripe checkout. Everything free stays free.</span></p>' +
|
| 66 |
+
'<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>';
|
| 67 |
var f = document.getElementById("cmx-pro-form");
|
| 68 |
+
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."); };
|
| 69 |
}
|
| 70 |
}
|
| 71 |
|
honeyfold/sw.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
/* Honeyfold offline cache. © 2026 CyberMax. All rights reserved. */
|
| 2 |
-
|
| 3 |
-
var
|
|
|
|
| 4 |
self.addEventListener("install", function (e) {
|
| 5 |
e.waitUntil(caches.open(CACHE).then(function (c) { return c.addAll(FILES); }).then(function () { return self.skipWaiting(); }));
|
| 6 |
});
|
|
@@ -16,5 +17,5 @@ self.addEventListener("fetch", function (e) {
|
|
| 16 |
var copy = r.clone();
|
| 17 |
caches.open(CACHE).then(function (c) { c.put(e.request, copy); });
|
| 18 |
return r;
|
| 19 |
-
}).catch(function () { return caches.match(e.request, { ignoreSearch: true }); }));
|
| 20 |
});
|
|
|
|
| 1 |
/* Honeyfold offline cache. © 2026 CyberMax. All rights reserved. */
|
| 2 |
+
/* 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. */
|
| 3 |
+
var CACHE = "honeyfold-v3";
|
| 4 |
+
var FILES = ["index.html", "style.css", "pro.js", "core.js", "game.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 |
});
|
|
|
|
| 17 |
var copy = r.clone();
|
| 18 |
caches.open(CACHE).then(function (c) { c.put(e.request, copy); });
|
| 19 |
return r;
|
| 20 |
+
}).catch(function () { return caches.match(e.request, { ignoreSearch: true }).then(function (h) { return h || (e.request.mode === "navigate" ? caches.match("index.html") : h); }); }));
|
| 21 |
});
|