Promo tools > Stack POL: 'Show my Stack POL page' switch (GET/POST /api/my/stackpol, DATA_DIR/stack-optin.json read by the stackpol.com indexer); chatbot knows Stack POL (KNOWLEDGE_DATE 2026-11-09); my.js v=20261109sp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+18
-1
@@ -2780,9 +2780,10 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
|
||||
if ($('tkGo')) { $('tkGo').addEventListener('click', tkGenerate); $('tkAgain').addEventListener('click', tkGenerate); $('tkCopy').addEventListener('click', async () => { try { await navigator.clipboard.writeText($('tkText').value); IAP.status('Copied.', 'ok'); } catch (e) { $('tkText').select(); } }); $('tkSendBc').addEventListener('click', tkSendBroadcast); }
|
||||
// promo tools: pill menu switches between posts / swipes / banners / wall / videos
|
||||
function setPromoSub(name) {
|
||||
const ids = ['toolkit', 'posts', 'text', 'swipe', 'banners', 'wall', 'objections', 'videos', 'viral', 'games', 'bixpay']; // bixpay: the BixPay partner kit, pill hidden while bixpayLive is off (2026-10-29)
|
||||
const ids = ['toolkit', 'posts', 'text', 'swipe', 'banners', 'wall', 'objections', 'videos', 'viral', 'stackpol', 'games', 'bixpay']; // bixpay: the BixPay partner kit, pill hidden while bixpayLive is off (2026-10-29)
|
||||
if (['polhunter', 'spookydoors', 'gamebanners'].includes(name)) name = 'games'; // those tabs live inside Games now (2026-10-06)
|
||||
if (name === 'toolkit') loadToolkit();
|
||||
if (name === 'stackpol') loadStackPol();
|
||||
const pill = document.querySelector('.promo-pills [data-promo="' + name + '"]');
|
||||
if (!ids.includes(name) || !pill || pill.hidden) name = 'posts';
|
||||
ids.forEach(id => { const el = $('promo-' + id); if (el) el.hidden = id !== name; });
|
||||
@@ -2792,6 +2793,22 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
|
||||
});
|
||||
try { localStorage.setItem('iap.promoSub', name); } catch (e) {}
|
||||
}
|
||||
// Stack POL page switch (2026-11-09): GET/POST /api/my/stackpol, the opt-in the stackpol.com indexer reads every 5 minutes
|
||||
function showStackPol(d) {
|
||||
$('spOn').checked = !!d.on; $('spLinkRow').hidden = !d.on; $('spUrl').textContent = d.url || ''; $('spOpen').href = d.url || '#';
|
||||
$('spNote').textContent = d.on ? (d.wallet ? 'Your page goes live within 5 minutes, then updates every 5 minutes.' : 'Link a wallet (Wallet tab) so your payouts can be added up on your page.') : '';
|
||||
}
|
||||
async function loadStackPol() { try { const r = await fetch('/api/my/stackpol'); const d = await r.json(); if (!r.ok) { $('spNote').textContent = d.error || ''; return; } showStackPol(d); } catch (e) {} }
|
||||
if ($('spOn')) {
|
||||
$('spOn').addEventListener('change', async () => {
|
||||
const on = $('spOn').checked;
|
||||
try { const r = await fetch('/api/my/stackpol', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ on }) }); const d = await r.json();
|
||||
if (!r.ok) { $('spOn').checked = !on; IAP.status(d.error || 'Could not save that.', 'bad'); return; }
|
||||
showStackPol(d); IAP.status(on ? 'Stack POL page switched on.' : 'Stack POL page switched off.', 'ok');
|
||||
} catch (e) { $('spOn').checked = !on; IAP.status('Could not save that. Try again.', 'bad'); }
|
||||
});
|
||||
$('spCopy').addEventListener('click', async () => { try { await navigator.clipboard.writeText($('spUrl').textContent); IAP.status('Link copied.', 'ok'); } catch (e) { const r = document.createRange(); r.selectNodeContents($('spUrl')); const sel = getSelection(); sel.removeAllRanges(); sel.addRange(r); } });
|
||||
}
|
||||
document.querySelectorAll('.promo-pills [data-promo]').forEach(b =>
|
||||
b.addEventListener('click', () => setPromoSub(b.dataset.promo)));
|
||||
try { setPromoSub(localStorage.getItem('iap.promoSub') || 'posts'); } catch (e) { setPromoSub('posts'); }
|
||||
|
||||
+11
-1
@@ -847,9 +847,19 @@
|
||||
<button class="chip-t" data-promo="objections" type="button" role="tab">Objections</button>
|
||||
<button class="chip-t" data-promo="videos" type="button" role="tab">Videos</button>
|
||||
<button class="chip-t" data-promo="viral" type="button" role="tab">Viral links</button>
|
||||
<button class="chip-t" data-promo="stackpol" type="button" role="tab">📈 Stack POL</button>
|
||||
<button class="chip-t" data-promo="games" type="button" role="tab">🎮 Games</button>
|
||||
<button class="chip-t" data-promo="bixpay" type="button" role="tab" hidden>💳 BixPay</button>
|
||||
</div>
|
||||
<!-- Stack POL page switch (2026-11-09): stackpol.com/<username> shows every POL payout to the member's wallets across the network -->
|
||||
<div class="card promo-sec" id="promo-stackpol" hidden>
|
||||
<div class="card-head"><h3>📈 Your Stack POL page</h3><span class="sub">every POL payout you have received across the network, on one page</span></div>
|
||||
<p class="muted small" style="margin:0 0 12px">Stack POL adds up what InstantAdPay, LinkSpin and the network games have paid to your wallet, with a Polygonscan link for every payment. Switch it on and you get a public page at stackpol.com/your-username with your total, where it came from, and your own referral link on every program. It updates every 5 minutes. Switch it off any time and the page goes away.</p>
|
||||
<label style="display:flex;gap:10px;align-items:center;font-weight:700;cursor:pointer"><input type="checkbox" id="spOn"> Show my Stack POL page</label>
|
||||
<div class="promo-strip" id="spLinkRow" style="padding:12px 0 0" hidden><div><span class="eyebrow" style="margin:0 0 4px">Your page</span><div class="mono small" id="spUrl" style="overflow-wrap:anywhere"></div></div><div style="display:flex;gap:8px;flex-wrap:wrap"><button class="btn small sec" type="button" id="spCopy">Copy link</button><a class="btn small" id="spOpen" href="#" target="_blank" rel="noopener">Open</a></div></div>
|
||||
<p class="muted small" id="spNote" style="margin:10px 0 0"></p>
|
||||
<p class="muted small" style="margin:10px 0 0">Your page shows your own results only. Nothing on it is a promise of what anyone else will earn.</p>
|
||||
</div>
|
||||
<!-- BixPay partner kit (2026-10-29): the member's resolved partner link, posts, an email swipe and four text-only banners; promo.js fillBix -->
|
||||
<div class="card promo-sec" id="promo-bixpay" hidden>
|
||||
<div class="card-head"><h3>💳 BixPay: a Visa card for your POL</h3><span class="sub" id="bixPromoSub">every link and banner here carries your partner link</span></div>
|
||||
@@ -1275,7 +1285,7 @@
|
||||
<script src="/assets/wallet.js?v=20260911a"></script>
|
||||
<script src="/assets/promo.js?v=20261103gp"></script>
|
||||
<script src="/assets/support.js?v=20261101th"></script>
|
||||
<script src="/assets/my.js?v=20261107nc"></script>
|
||||
<script src="/assets/my.js?v=20261109sp"></script>
|
||||
<script src="/assets/fuel.js?v=20261025ff"></script>
|
||||
<script src="/assets/engine-room.js?v=20261101th"></script>
|
||||
<script src="/assets/chat.js?v=20261016n"></script>
|
||||
|
||||
Reference in New Issue
Block a user