Wired Wednesday: +25% on $10+ packs wired into a verified-visits campaign; /wednesday bridge page, banners, kit, cards, chatbot (notice + kickoff off until approved)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -152,7 +152,7 @@ function rss(posts) {
|
||||
return '<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>InstantAdPay blog</title><link>' + SITE + '/blog</link><description>Coaching and teaching articles from Marty Bostick.</description>' + items + '</channel></rss>';
|
||||
}
|
||||
function sitemap(posts) {
|
||||
const pages = ['/', '/blog', '/whats-new', '/leaderboard', '/ledger', '/contract', '/plays', '/wallets', '/earning', '/partners', '/friday'];
|
||||
const pages = ['/', '/blog', '/whats-new', '/leaderboard', '/ledger', '/contract', '/plays', '/wallets', '/earning', '/partners', '/friday', '/wednesday'];
|
||||
const u = pages.map(p => '<url><loc>' + SITE + p + '</loc><changefreq>weekly</changefreq></url>').join('')
|
||||
+ posts.map(p => '<url><loc>' + SITE + '/blog/' + p.slug + '</loc><lastmod>' + new Date(p.updated).toISOString().slice(0, 10) + '</lastmod><changefreq>monthly</changefreq></url>').join('');
|
||||
return '<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' + u + '</urlset>';
|
||||
|
||||
@@ -24,6 +24,8 @@ const KNOWLEDGE_DATE = '2026-09-18'; // bump whenever the canned answers / promp
|
||||
const CANNED = [
|
||||
{ re: /(viral link|any page.{0,30}(link|referr)|blog.{0,40}(referral|my link|credit)|(referral|invite|my) link.{0,30}(blog|article|any page)|\?ref=|ref=)/i,
|
||||
a: 'Any page on instantadpay.com becomes your referral link when you add ?ref= and your username to the end, for example instantadpay.com/blog/what-is-a-feeder-program?ref=yourname. Whoever opens it is tagged to you for 30 days, exactly like your invite link, so if they join from any page on the site the credit is yours. Promo tools > Viral links builds these links for you, and every blog article shows your link when you are signed in.' },
|
||||
{ re: /(wired wednesday|wednesday (bonus|promo|deal|special)|what happens on wednesday)/i,
|
||||
a: 'Wired Wednesday: every Wednesday (Central time, midnight to midnight), any ad package from $10 up earns +25% bonus credits, and the bonus is wired straight into a verified-visits campaign for your invite link the moment the purchase settles, so real people are on your page before you close the tab. It shows under Campaigns right away and in your credit log. The page instantadpay.com/wednesday shows whether it is live now and the next date; add ?ref=yourusername to that address and anyone who joins from it is your referral. Every pack still pays its sponsor line in the same on-chain transaction. Credits buy ad delivery and cannot be withdrawn; no income is guaranteed.' },
|
||||
{ re: /(five dollar friday|5 dollar friday|\$5 friday|friday (bonus|promo|deal|special)|what happens on friday)/i,
|
||||
a: 'Five Dollar Friday: every Friday (Central time), any ad package from $5 up earns +20% bonus credits, added the moment the purchase settles and labelled in your credit log. The page instantadpay.com/friday shows whether it is live right now and the next date; add ?ref=yourusername to that address and anyone who joins from it is your referral. Every pack pays its sponsor line in the same on-chain transaction, so when the whole network buys on the same day every line gets paid at once. Five Fridays in a row earn the Five Fridays badge. Buy under My account > Buy packages.' },
|
||||
// 2026-09-18: sessions were shortened to 4h on purpose. Members WILL ask why they keep being
|
||||
@@ -104,6 +106,7 @@ function systemPrompt() {
|
||||
return `You are the assistant on InstantAdPay (https://instantadpay.com), a membership advertising platform.
|
||||
|
||||
FACTS:
|
||||
- WIRED WEDNESDAY: every Wednesday, Central time (midnight to midnight), any ad package of $10 or more earns +25% bonus credits that are wired straight into a verified-visits campaign for the buyer's invite link the moment the purchase settles (it appears under Campaigns immediately; credit log label "Wired Wednesday"). First one: Wednesday 2026-09-30. Page: instantadpay.com/wednesday. Credits buy ad delivery, never money.
|
||||
- FIVE DOLLAR FRIDAY: every Friday, Central time, any ad package of $5 or more earns +20% bonus credits, credited the moment the purchase settles (credit log shows the label). First one: Friday 2026-09-25. Five Fridays in a row = the Five Fridays badge. The point: the whole network buys on the same day, every pack pays its sponsor line in the same transaction, so every line gets paid at once. No income promises.
|
||||
- SESSIONS LAST 4 HOURS. Sign-ins expire after 4 hours and the member signs in again with a fresh 6-digit code. This is intentional and we say so plainly: it keeps resources optimised, and the login sponsor ad shown on the way back in is part of what pays for the free side. Nothing is lost on expiry - credits, line and account are untouched. Never describe it as a bug, an error, or something to report.
|
||||
- Free to join with email only (6-digit code sign-in, no passwords). Wallet appears only at purchase or payout activation. Every new member gets a small welcome batch of ad credits — unlocked by the WELCOME TOUR on first sign-in: they visit their upline's line-banner sites (up to 3, 10 seconds each — the same 3 levels the contract pays), then claim the credits. Members with no upline banners get the credits instantly.
|
||||
|
||||
@@ -62,6 +62,15 @@
|
||||
} catch (e) {}
|
||||
}
|
||||
loadFriday();
|
||||
// Wired Wednesday strip: the live wave on Wednesdays, the next date otherwise
|
||||
async function loadWednesday() {
|
||||
try { const f = await (await fetch('/api/wednesday')).json(); const el = document.getElementById('wwStrip'); if (!f.on || !el) return; el.hidden = false;
|
||||
el.innerHTML = f.live && f.today
|
||||
? '<b>⚡ It’s Wired Wednesday.</b> ' + f.today.packs + ' pack' + (f.today.packs === 1 ? '' : 's') + ' bought so far today, ' + Number(f.today.visits || 0).toLocaleString() + ' verified visits wired to members’ pages. Any pack from $' + f.minUsd + ' earns +' + f.pct + '% credits, wired into visits to your page, until midnight Central. <a href="/my">Get yours</a>'
|
||||
: '<b>⚡ Wired Wednesday:</b> every Wednesday, any ad package from $' + f.minUsd + ' up earns +' + f.pct + '% bonus credits, wired straight into verified visits to your page. Next one: ' + (f.nextLabel || 'soon') + '. <a href="/wednesday">How it works</a>';
|
||||
} catch (e) {}
|
||||
}
|
||||
loadWednesday();
|
||||
async function loadStats() {
|
||||
try {
|
||||
const s = await (await fetch('/api/stats')).json();
|
||||
|
||||
+29
-5
@@ -1538,6 +1538,24 @@
|
||||
} catch (e) {}
|
||||
}
|
||||
loadFridayCard(); setInterval(loadFridayCard, 120000);
|
||||
// Wired Wednesday card on the Overview: the live wave on Wednesdays, the date the rest of the week
|
||||
async function loadWednesdayCard() {
|
||||
const card = $('wwCard'); if (!card) return;
|
||||
if (cardHidden('ww')) { card.hidden = true; return; }
|
||||
try {
|
||||
const f = await (await fetch('/api/wednesday')).json(); if (!f.on) { card.hidden = true; return; }
|
||||
card.hidden = false;
|
||||
if (f.live && f.today) card.innerHTML = '<div class="card-head"><h3>⚡ It’s Wired Wednesday</h3><span class="sub">+' + f.pct + '% credits, wired into visits, on any $' + f.minUsd + '+ pack today</span></div>'
|
||||
+ '<p><b>' + f.today.packs + '</b> pack' + (f.today.packs === 1 ? '' : 's') + ' so far today from <b>' + f.today.buyers + '</b> buyer' + (f.today.buyers === 1 ? '' : 's') + ', <b>' + Number(f.today.visits || 0).toLocaleString() + '</b> verified visits wired to members’ pages, <b>' + f.today.polPaid.toFixed(2) + ' POL</b> paid to members in the same transactions. Buy any $' + f.minUsd + '+ package before midnight Central and +' + f.pct + '% is wired into a visits campaign for your invite link, running the moment it settles.</p>'
|
||||
+ '<button class="btn" type="button" id="wwBuy">Buy my Wednesday pack</button> <a class="btn sec" href="/wednesday" target="_blank" rel="noopener">How it works</a>';
|
||||
else card.innerHTML = '<div class="card-head"><h3>⚡ Wired Wednesday</h3><span class="sub">every Wednesday</span></div>'
|
||||
+ '<p>Every Wednesday (Central time), any ad package from $' + f.minUsd + ' up earns <b>+' + f.pct + '% bonus credits</b>, wired straight into a verified-visits campaign for your invite link the moment it settles. Real people on your page, running before you close the tab. Next one: <b>' + (f.nextLabel || 'soon') + '</b>.</p>'
|
||||
+ '<button class="btn sec" type="button" id="wwBuy">See the packages</button>';
|
||||
const b = $('wwBuy'); if (b) b.addEventListener('click', () => { const m = document.querySelector('.bo-menu [data-pane="buy"]'); if (m) m.click(); });
|
||||
cardDismiss(card, 'ww');
|
||||
} catch (e) {}
|
||||
}
|
||||
loadWednesdayCard(); setInterval(loadWednesdayCard, 120000);
|
||||
// launch-day surprise (Marty, 2026-09-20): PolHunter appears at siteConfig.launchAt, not a minute before.
|
||||
// The card and the menu entry flip on their own if the dashboard is already open.
|
||||
let phShown = false;
|
||||
@@ -2135,6 +2153,11 @@
|
||||
bwrap.dataset.filled = '1';
|
||||
// one collapsed accordion per size / use, so the kit stays scannable as it grows
|
||||
const GROUPS = [
|
||||
{ title: 'Wired Wednesday · share with your /wednesday link', bridge: { page: 'wednesday', name: 'Wired Wednesday', short: 'Wednesday' }, items: [
|
||||
{ file: 'iap-wired-wednesday-1200x630.jpg', size: '1200×630 · Wired Wednesday · social card, link previews, Daily News' },
|
||||
{ file: 'iap-wired-wednesday-1080x1080.jpg', size: '1080×1080 · Wired Wednesday · Instagram, Facebook, Telegram' },
|
||||
{ file: 'iap-wired-wednesday-728x90.png', size: '728×90 · Wired Wednesday · leaderboard' },
|
||||
{ file: 'iap-wired-wednesday-300x250.png', size: '300×250 · Wired Wednesday · rectangle' } ] },
|
||||
{ title: 'Five Dollar Friday · share with your /friday link', friday: true, items: [
|
||||
{ file: 'iap-five-dollar-friday-v2-1200x630.jpg', size: '1200×630 · Five Dollar Friday · loft, Central-time window' },
|
||||
{ file: 'iap-five-dollar-friday-dark-1200x630.jpg', size: '1200×630 · Five Dollar Friday · dark studio' },
|
||||
@@ -2186,16 +2209,17 @@
|
||||
det.className = 'pb-acc';
|
||||
det.innerHTML = '<summary><span>' + esc(g.title) + '</span><span class="pb-count">' + g.items.length + (g.items.length === 1 ? ' banner' : ' banners') + '</span></summary><div class="pb-grid"></div>';
|
||||
const grid = det.querySelector('.pb-grid');
|
||||
if (g.friday) {
|
||||
const bridge = g.bridge || (g.friday ? { page: 'friday', name: 'Five Dollar Friday', short: 'Friday' } : null);
|
||||
if (bridge) {
|
||||
// the bridge page with this member's referral: any public page + ?ref sets the sponsor cookie
|
||||
const inv = (document.getElementById('inviteLine') || {}).textContent || '';
|
||||
const fl = inv.replace(/\/join\/([^/?#]+).*$/, '/friday?ref=$1');
|
||||
const fl = inv.replace(/\/join\/([^/?#]+).*$/, '/' + bridge.page + '?ref=$1');
|
||||
const note = document.createElement('div');
|
||||
note.className = 'pb-note';
|
||||
note.innerHTML = '<span>Post any of these with your Five Dollar Friday link: <b class="mono"></b></span>';
|
||||
note.innerHTML = '<span>Post any of these with your ' + esc(bridge.name) + ' link: <b class="mono"></b></span>';
|
||||
note.querySelector('b').textContent = fl;
|
||||
const cp = document.createElement('button'); cp.className = 'btn small'; cp.textContent = 'Copy my Friday link';
|
||||
cp.addEventListener('click', async () => { try { await navigator.clipboard.writeText(fl); IAP.status('Friday link copied.', 'ok'); } catch (e) { IAP.status('Copy failed.', 'bad'); } });
|
||||
const cp = document.createElement('button'); cp.className = 'btn small'; cp.textContent = 'Copy my ' + bridge.short + ' link';
|
||||
cp.addEventListener('click', async () => { try { await navigator.clipboard.writeText(fl); IAP.status(bridge.short + ' link copied.', 'ok'); } catch (e) { IAP.status('Copy failed.', 'bad'); } });
|
||||
note.appendChild(cp);
|
||||
grid.before(note);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ window.IAPPromo = (function () {
|
||||
// The Five Dollar Friday bridge page with the member's referral: /friday?ref=<username>. Any
|
||||
// public page plus ?ref sets the same sponsor cookie as the invite link (viral links, 2026-09-21).
|
||||
const fridayLink = link => link.replace(/\/join\/([^/?#]+).*$/, '/friday?ref=$1');
|
||||
const wednesdayLink = link => link.replace(/\/join\/([^/?#]+).*$/, '/wednesday?ref=$1');
|
||||
|
||||
// ── social posts ──
|
||||
const POSTS = [
|
||||
@@ -19,6 +20,9 @@ window.IAPPromo = (function () {
|
||||
{ net: 'Telegram', label: 'Telegram or WhatsApp group · Five Dollar Friday', text: 'Quick one for the group: Five Dollar Friday on InstantAdPay. Any ad package from $5 up earns 20% bonus credits today (Central time, until midnight). The page shows whether it is live right now: {{FRIDAY}}' },
|
||||
{ net: 'X', label: 'X · Five Dollar Friday', text: 'Five Dollar Friday on InstantAdPay: every Friday, any ad package from $5 earns +20% bonus credits, and every pack pays its sponsor line in the same on-chain transaction. The whole network buys on the same day. Join free and line yours up: {{LINK}}' },
|
||||
{ net: 'Telegram', label: 'Telegram or WhatsApp · Five Dollar Friday', text: 'Reminder for the group: tomorrow is Five Dollar Friday on InstantAdPay. Any pack from $5 up earns +20% credits, and your pack pays your sponsor line the second it settles. Everyone pushes on the same day, and every line gets paid at once. Free to join: {{LINK}}' },
|
||||
{ net: 'X', label: 'X · Wired Wednesday', text: 'Wired Wednesday on InstantAdPay: any ad package from $10 up earns 25% bonus credits, wired straight into verified visits to your page the moment it settles. Real people on your page before you close the tab. Every Wednesday, Central time. Free to join: {{WEDNESDAY}}' },
|
||||
{ net: 'Facebook', label: 'Facebook · Wired Wednesday', text: 'Wednesdays on InstantAdPay are different. Buy any ad package from $10 up and 25% extra credits are wired straight into a verified-visits campaign for your invite page, already running the second the purchase settles. No code, nothing to set up. And every pack pays the sponsor line in the same blockchain transaction. Midnight to midnight Central. Free to join by email: {{WEDNESDAY}}' },
|
||||
{ net: 'Telegram', label: 'Telegram or WhatsApp group · Wired Wednesday', text: 'Quick one for the group: Wired Wednesday on InstantAdPay. Any ad package from $10 up earns 25% bonus credits today, wired straight into real visits to your invite page (Central time, until midnight). The page shows whether it is live right now: {{WEDNESDAY}}' },
|
||||
{ net: 'X', label: 'X · instant payout', text: 'No withdraw button. A smart contract on Polygon splits every ad package the second it sells: 50% to the sponsor, 20% to level 2, 10% to level 3. Lands in your own wallet. Watch the ledger move: {{LINK:instant}}' },
|
||||
{ net: 'X', label: 'X · advertiser', text: 'Marketers: you were buying traffic anyway. Here the ad spend in your line pays you, in the same transaction, on a public ledger. Packages from $5. Join free: {{LINK:adspend}}' },
|
||||
{ net: 'X', label: 'X · free join', text: 'Join free. View a few ads, earn credits, run your first campaign for zero dollars. Seven ad formats, real dwell-timed attention, every payout public on Polygon. {{LINK:free}}' },
|
||||
@@ -32,6 +36,7 @@ window.IAPPromo = (function () {
|
||||
// ── text a friend (SMS-sized) ──
|
||||
const TEXTS = [
|
||||
{ angle: 'friday', title: '"Five Dollar Friday"', text: 'Heads up: Fridays on InstantAdPay any ad package from $5 up gets 20% bonus credits, Central time. Page tells you if it is live right now: {{FRIDAY}}' },
|
||||
{ angle: 'wednesday', title: '"Wired Wednesday"', text: 'Heads up: Wednesdays on InstantAdPay any ad package from $10 up gets 25% bonus credits wired straight into real visits to your page, Central time. Page tells you if it is live right now: {{WEDNESDAY}}' },
|
||||
{ angle: '', title: '"Thought of you"', text: 'Hey, found an ad platform where the commission lands in your wallet the second someone buys. No pending, no withdraw button. Free to look: {{LINK}}' },
|
||||
{ angle: 'instant', title: '"Before the page reloads"', text: 'Random thought. What if your commission showed up before the thank-you page finished loading? That is literally how this works: {{LINK:instant}}' },
|
||||
{ angle: 'adspend', title: '"You buy ads anyway"', text: 'You already buy traffic. This one pays your line every time someone in it buys ads, same transaction, on Polygon. Two-minute look: {{LINK:adspend}}' },
|
||||
@@ -42,6 +47,7 @@ window.IAPPromo = (function () {
|
||||
// ── email swipes ──
|
||||
const SWIPES = [
|
||||
{ tier: 'Five Dollar Friday', subject: 'Tomorrow is Five Dollar Friday', body: 'Quick heads-up.\n\nTomorrow is Five Dollar Friday on InstantAdPay. Any ad package from $5 up, bought on Friday (Central time), earns +20% bonus credits the moment it settles.\n\nHere is why it matters: every pack pays its sponsor line in the same transaction, on the Polygon blockchain. When the whole network buys on the same day, every line gets paid at once, and you can watch it happen on the public ledger.\n\nIt is free to join. Line up your pack tonight so you are ready when Friday starts:\n{{LINK}}\n\nAdvertising with a referral program. Not an investment, no income guaranteed.' },
|
||||
{ tier: 'Wired Wednesday', subject: 'Tomorrow is Wired Wednesday', body: 'Quick heads-up.\n\nTomorrow is Wired Wednesday on InstantAdPay. Any ad package from $10 up, bought on Wednesday (Central time), earns +25% bonus credits, and the bonus is wired straight into a verified-visits campaign for your invite page. Real people on your page, running the moment the purchase settles, nothing to set up.\n\nAnd like every pack, it pays the sponsor line in the same transaction on the Polygon blockchain, public on the ledger.\n\nIf you have been meaning to get a pack, tomorrow is the day: {{WEDNESDAY}}\n\nNo income promises. Advertising, not investing.' },
|
||||
{ tier: 'Short', subject: 'Paid the second it sells', body: 'Quick one.\n\nI joined an ad platform where every package splits to sponsor wallets in the same transaction as the sale. No pending payouts, no withdraw button. It is on the Polygon blockchain, and every payment is public.\n\nJoin free, look at the ledger, decide later: {{LINK:instant}}\n\nNo income promises. Advertising, not investing.' },
|
||||
{ tier: 'Standard', subject: 'Your wallet gets paid instantly', body: 'You know the usual drill. Someone buys on your link, you wait for a payout. Maybe days. Maybe an approval hold. Maybe a "your account is under review."\n\nInstantAdPay does not work like that.\n\nA smart contract on the Polygon blockchain handles every purchase the second it happens. 50% to the sponsor. 20% to the next level. 10% to the one after that. 20% to the platform. Each split lands directly in your own wallet. No withdrawal button. No "request payout." No approval queue.\n\nThe money just shows up.\n\nYou can watch every transaction on the public ledger. Real time. Anyone can verify it.\n\nFree to join. Packages from $5 to $250. No income promises. It is advertising, not investing.\n\n{{LINK}}' },
|
||||
{ tier: 'Long', subject: 'The ad network with no pending payouts', body: 'Let me tell you what you are actually looking at, because "crypto ad platform" can mean anything.\n\nInstantAdPay sells advertising. Five packages, $5 to $250. A package mints ad credits, and one credit is one cent of delivery across seven formats: display banners, text ads, full-screen login ads, solo ads delivered into member inboxes, video ads, featured links, and verified visits. Members earn credits for their attention, with a timer that pauses when they look away, so your ad is seen by a person, not a script.\n\nNow the part that made me join.\n\nWhen anyone in your line buys a package, a verified smart contract on Polygon splits the payment in that same transaction: 50 percent to their direct sponsor, 20 percent to level two, 10 percent to level three, 20 percent to the platform. It lands in real wallets in seconds. There is no balance to withdraw because nothing is ever held.\n\nEvery one of those payments is public. Open the ledger, click a transaction, read it on Polygonscan.\n\nJoining is free and only needs an email. Your wallet comes out when you buy a package or switch on payouts. If you never spend a dollar, you can still view ads, earn credits, and run a small campaign on those.\n\nHave a look: {{LINK:instant}}\n\nOne honest line: nobody is promising you an income. Results depend on your effort, and crypto carries risk of loss.' },
|
||||
@@ -62,7 +68,7 @@ window.IAPPromo = (function () {
|
||||
];
|
||||
|
||||
function fillLink(text, link) {
|
||||
return text.replace(/\{\{FRIDAY\}\}/g, fridayLink(link)).replace(/\{\{LINK(?::([a-z]+))?\}\}/g, (m, a) => angleLink(link, a));
|
||||
return text.replace(/\{\{FRIDAY\}\}/g, fridayLink(link)).replace(/\{\{WEDNESDAY\}\}/g, wednesdayLink(link)).replace(/\{\{LINK(?::([a-z]+))?\}\}/g, (m, a) => angleLink(link, a));
|
||||
}
|
||||
function copyBtn(text, label) {
|
||||
const b = document.createElement('button');
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* /wednesday status strip. External file on purpose: the site's CSP blocks inline scripts. */
|
||||
(function () {
|
||||
var el = document.getElementById('wwState');
|
||||
if (!el) return;
|
||||
function n(x) { return Number(x || 0).toLocaleString('en-US'); }
|
||||
// the minute (Central) when the next Wednesday starts, found by scanning rather than assumed,
|
||||
// so a daylight-saving change cannot put the countdown an hour out
|
||||
function startsAt(dayKey) {
|
||||
var now = Date.now();
|
||||
for (var m = 0; m < 8 * 1440; m++) {
|
||||
var t = now + m * 60000;
|
||||
var d = new Date(t).toLocaleDateString('en-CA', { timeZone: 'America/Chicago' });
|
||||
if (d === dayKey) return t;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function render(f) {
|
||||
if (!f || !f.on) { el.innerHTML = '<span class="fr-tag">Paused</span><span>Wired Wednesday is not running right now. Join free and you will hear when it is back.</span>'; return; }
|
||||
if (f.live) {
|
||||
var t = f.today || {};
|
||||
el.className = 'fr-state live';
|
||||
el.innerHTML = '<span class="fr-tag">Live now</span><span><b>It is Wired Wednesday.</b> Bonus runs until midnight Central.</span>'
|
||||
+ '<span><span class="fr-num">' + n(t.packs) + '</span> pack' + (t.packs === 1 ? '' : 's') + ' so far today</span>'
|
||||
+ '<span><span class="fr-num">' + n(t.visits) + '</span> verified visits wired</span>';
|
||||
return;
|
||||
}
|
||||
var at = f.nextWednesday ? startsAt(f.nextWednesday) : null;
|
||||
var left = at ? Math.max(0, at - Date.now()) : 0;
|
||||
var hrs = Math.floor(left / 3600000), mins = Math.floor((left % 3600000) / 60000), days = Math.floor(hrs / 24);
|
||||
var when = at ? (days >= 1 ? days + ' day' + (days === 1 ? '' : 's') + ' ' + (hrs % 24) + 'h' : hrs + 'h ' + mins + 'm') : '';
|
||||
el.className = 'fr-state';
|
||||
el.innerHTML = '<span class="fr-tag">Next</span><span><b>Next Wired Wednesday: ' + (f.nextLabel || f.nextWednesday || 'soon') + '.</b> Starts at midnight Central' + (when ? ', in ' + when : '') + '.</span>'
|
||||
+ '<span>Join now so your account is ready before it starts.</span>';
|
||||
}
|
||||
fetch('/api/wednesday').then(function (r) { return r.ok ? r.json() : null; }).catch(function () { return null; }).then(render);
|
||||
})();
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 80 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
+2
-1
@@ -70,6 +70,7 @@
|
||||
</div>
|
||||
<p class="hero-note">every number above is read from the blockchain, not a marketing database</p>
|
||||
<div class="fdf" id="fdfStrip" hidden></div>
|
||||
<div class="fdf" id="wwStrip" hidden></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -498,7 +499,7 @@
|
||||
|
||||
<script src="/assets/common.js?v=20260923b"></script><script src="/assets/welcome.js?v=20260923b"></script>
|
||||
<script src="/assets/wallet.js?v=20260909c"></script>
|
||||
<script src="/assets/home.js?v=20260920fdf"></script>
|
||||
<script src="/assets/home.js?v=20260929a"></script>
|
||||
<script src="/assets/chat.js?v=20260906m"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+3
-2
@@ -179,6 +179,7 @@
|
||||
<div class="card" id="phReturn" hidden></div>
|
||||
<div class="card" id="phLaunch" hidden></div>
|
||||
<div class="card" id="fdfCard" hidden></div>
|
||||
<div class="card" id="wwCard" hidden></div>
|
||||
<div class="card gs" id="gsCard" hidden>
|
||||
<div class="card-head"><h3>Getting started</h3><span class="sub" id="gsSub"></span></div>
|
||||
<div class="gs-steps" id="gsSteps"></div>
|
||||
@@ -1082,8 +1083,8 @@
|
||||
</div>
|
||||
<script src="/assets/common.js?v=20260923b"></script><script src="/assets/welcome.js?v=20260923b"></script>
|
||||
<script src="/assets/wallet.js?v=20260911a"></script>
|
||||
<script src="/assets/promo.js?v=20260925a"></script>
|
||||
<script src="/assets/my.js?v=20260927c"></script>
|
||||
<script src="/assets/promo.js?v=20260929a"></script>
|
||||
<script src="/assets/my.js?v=20260929a"></script>
|
||||
<script src="/assets/chat.js?v=20260907l"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Wired Wednesday: 25% bonus credits, wired straight into visits to your page | InstantAdPay</title>
|
||||
<meta name="description" content="Every Wednesday (US Central time), any InstantAdPay ad package from $10 up earns 25% bonus credits, wired straight into a verified-visits campaign for your invite link the moment it settles. Real people on your page before you close the tab. Join free by email.">
|
||||
<meta name="theme-color" content="#043b2f">
|
||||
<meta property="og:type" content="website"><meta property="og:site_name" content="InstantAdPay">
|
||||
<meta property="og:title" content="Wired Wednesday: 25% bonus credits, wired straight into visits to your page">
|
||||
<meta property="og:description" content="Every Wednesday, US Central time, midnight to midnight. Any ad package from $10 up earns 25% bonus credits, already running as verified visits to your invite link the moment the purchase settles. Join free by email.">
|
||||
<meta property="og:image" content="https://instantadpay.com/banners/iap-wired-wednesday-1200x630.jpg">
|
||||
<meta property="og:url" content="https://instantadpay.com/wednesday">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
|
||||
<link rel="icon" type="image/png" href="/logo-icon.png">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=20260912b">
|
||||
<style>
|
||||
.fr{max-width:860px}
|
||||
.fr .hero{padding:44px 0 10px}
|
||||
.fr-banner{display:block;width:100%;max-width:860px;border-radius:16px;border:1px solid var(--line);margin:18px 0 14px}
|
||||
.fr-state{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;padding:14px 18px;border-radius:14px;border:1px solid var(--line);background:rgba(67,232,195,.06);margin:0 0 26px;font-size:15px}
|
||||
.fr-state.live{border-color:rgba(255,178,56,.55);background:rgba(255,178,56,.09)}
|
||||
.fr-tag{font-family:var(--mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;padding:4px 9px;border-radius:999px;background:var(--mint);color:#04120e}
|
||||
.fr-state.live .fr-tag{background:#ffb238}
|
||||
.fr-state b{font-family:var(--disp)}
|
||||
.fr-num{font-family:var(--mono);font-variant-numeric:tabular-nums}
|
||||
.fr-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin:8px 0 26px}
|
||||
.fr-step{border:1px solid var(--line);border-radius:14px;padding:16px 18px;background:rgba(255,255,255,.02)}
|
||||
.fr-step .n{font-family:var(--mono);font-size:11px;letter-spacing:.12em;color:var(--mint);text-transform:uppercase}
|
||||
.fr-step h3{font-family:var(--disp);font-size:17px;margin:6px 0 6px}
|
||||
.fr-step p{margin:0;font-size:14.5px;color:var(--muted)}
|
||||
.fr-cta{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:6px 0 30px}
|
||||
.fr-cta .btn.big{font-size:17px;padding:14px 22px}
|
||||
.fr-rule{border-left:4px solid var(--mint);background:rgba(67,232,195,.07);padding:14px 18px;border-radius:0 12px 12px 0;margin:0 0 22px;font-size:14.5px}
|
||||
.fr-share{border:1px dashed var(--line);border-radius:14px;padding:16px 18px;margin:0 0 30px;font-size:14.5px;color:var(--muted)}
|
||||
.fr-share b{color:var(--ink)}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap fr">
|
||||
<section class="hero">
|
||||
<p class="eyebrow">Every Wednesday · US Central time · midnight to midnight</p>
|
||||
<h1>Wired Wednesday: <em>25% bonus credits</em>, wired straight into visits to your page.</h1>
|
||||
<p class="lead">Buy any InstantAdPay ad package from $10 up on a Wednesday and 25% extra credits are wired into a verified-visits campaign for your invite link the moment the purchase settles. Real people on your page, running before you close the tab. No code, nothing to claim, nothing to set up. And like every pack, it pays the sponsor line above you in the same transaction.</p>
|
||||
</section>
|
||||
<img class="fr-banner" src="/banners/iap-wired-wednesday-1200x630.jpg" alt="Wired Wednesday: 25% bonus credits wired straight into verified visits to your page. Wednesdays 12:00 AM to 11:59 PM US Central time." width="1200" height="630">
|
||||
<div class="fr-state" id="wwState"><span class="fr-tag">Checking</span><span>Loading today’s status…</span></div>
|
||||
<div class="fr-cta">
|
||||
<a class="btn big" id="wwJoin" href="/join?v=wednesday">Join free by email</a>
|
||||
<a class="btn sec" href="/my#buy">Already a member? Get your pack</a>
|
||||
</div>
|
||||
<div class="fr-steps">
|
||||
<div class="fr-step"><div class="n">Step 1</div><h3>Join free, by email.</h3><p>Email first, wallet later, inside your account. Nothing to install to look around.</p></div>
|
||||
<div class="fr-step"><div class="n">Step 2</div><h3>Buy any pack from $10 on a Wednesday.</h3><p>Central time, midnight to midnight. 25% extra credits are added the moment the purchase settles and spent, for you, on verified visits to your invite link. The campaign shows under Campaigns right away.</p></div>
|
||||
<div class="fr-step"><div class="n">Step 3</div><h3>Your pack pays the line above you. Theirs pays you.</h3><p>Every package is one Polygon transaction that splits to the sponsor line instantly. Public on the ledger, nothing held.</p></div>
|
||||
</div>
|
||||
<div class="fr-rule"><b>What a verified visit is.</b> A member opens your page in a new tab, stays for the required time and passes a check before the visit counts, so every visit the bonus buys is a real person who actually saw your page. Credits are not money and cannot be withdrawn; they buy ad delivery across the network.</div>
|
||||
<div class="fr-share" id="wwShare"><b>Members: this page is your Wednesday promo tool.</b> Add <span class="fr-num">?ref=yourusername</span> to this address and anyone who joins from it is your referral, exactly like your invite link. Promo tools has the banners and posts ready with your link filled in.</div>
|
||||
<p class="muted small" style="margin-top:10px">No income is guaranteed. Results depend on your effort. Cryptocurrency involves risk of loss. InstantAdPay sells advertising; it is not an investment product.</p>
|
||||
<footer>
|
||||
<div>InstantAdPay · <a href="/">Home</a> · <a href="/friday">Five Dollar Friday</a> · <a href="/ledger">Live ledger</a> · <a href="/earning">How earning works</a></div>
|
||||
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees.</div>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="/assets/wednesday.js?v=20260929a"></script>
|
||||
<script src="/assets/common.js?v=20260923b"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -45,12 +45,13 @@ const leaderboard = require('./leaderboard');
|
||||
const toolkit = require('./toolkit');
|
||||
const badge = require('./badge'); // achievement badge image drawn on the server with ffmpeg (2026-09-16)
|
||||
const friday = require('./friday');
|
||||
const wednesday = require('./wednesday'); // Wired Wednesday: +25% on $10+ packs, wired into a visits campaign (2026-09-29)
|
||||
const fridaybank = require('./fridaybank'); // Friday Bonus Hunts: days banked Sat-Thu by solo + video (2026-09-26)
|
||||
const refill = require('./refill'); // campaign running-low / ran-out notices, and what came of them // Five Dollar Friday: +20% credits on Friday packs, the wave, the badge (Marty, 2026-09-20)
|
||||
const snapshot = require('./snapshot'); // daily growth snapshot -> Telegram payments feed (Marty, 2026-09-15)
|
||||
const pipeline = require('./pipeline'); // sponsor follow-up board (coming soon until site setting pipelineMode = on) (Marty, 2026-09-15)
|
||||
const videomaker = require('./videomaker'); // Circuit tool: promo videos with the member's own end card (ffmpeg in the image) // badge-gated promo toolkit + AI Copy Engine (Surge and up) (Marty, 2026-09-14) // referral contest: /leaderboard, Overview card, weekly + monthly winners (Marty, 2026-09-14) // release notes + roadmap: /whats-new, Overview card, Admin > Releases (Marty, 2026-09-14) // blog -> Blotato -> X + Instagram on publish (Marty, 2026-09-13) // admin member card: search, drilldown, edits (Marty, 2026-09-13) // admin-written coaching articles, server-rendered public /blog with SEO metadata (Marty, 2026-09-12)
|
||||
const TRAFFIC_PAGES = new Set(['/', '/ledger', '/contract', '/shorts', '/plays', '/wallets', '/launch', '/partners', '/earning', '/blog', '/whats-new', '/leaderboard', '/friday']);
|
||||
const TRAFFIC_PAGES = new Set(['/', '/ledger', '/contract', '/shorts', '/plays', '/wallets', '/launch', '/partners', '/earning', '/blog', '/whats-new', '/leaderboard', '/friday', '/wednesday']);
|
||||
let tankWaitCache = null; // dashboard: who is waiting for a sponsor (refreshed every minute)
|
||||
const geo = require('./geo'); // viewer country -> tier (DB-IP lite), for campaign targeting
|
||||
const burner = require('./burner'); // automatic on-chain credit burns (inert without ENGINE_KEY)
|
||||
@@ -335,6 +336,7 @@ const JOIN_ANGLES = {
|
||||
adspend: { t: 'You were buying ads anyway.', d: 'Here the ad spend in your line pays you, in the same transaction, on a public ledger. Seven formats, packages from $5. Join free.' },
|
||||
free: { t: 'Watch first. Spend never.', d: 'Join free, view a few ads, earn credits, run your first campaign for zero dollars. Every payout public on Polygon.' },
|
||||
friday: { t: 'Five Dollar Friday: 20% bonus credits.', d: 'Every Friday, US Central time, any ad package from $5 up earns 20% bonus credits the moment it settles, and every pack pays its sponsor line in the same transaction. Join free by email.' },
|
||||
wednesday: { t: 'Wired Wednesday: 25% bonus credits, wired into visits to your page.', d: 'Every Wednesday, US Central time, any ad package from $10 up earns 25% bonus credits, wired straight into a verified-visits campaign for your invite link the moment it settles. Join free by email.' },
|
||||
ledger: { t: 'No back office. No payday.', d: 'Every payout is a public transaction on Polygon you can read yourself. Nothing is ever held. Join free by email.' },
|
||||
two: { t: 'Two buyers open level two.', d: 'Every direct buyer pays you 50 percent from their first package. Two qualifying buyers open level two, five open level three. Written in a verified contract.' }
|
||||
};
|
||||
@@ -451,6 +453,7 @@ async function boot() {
|
||||
emailOnEvent(ev).catch(() => {});
|
||||
telegramOnEvent(ev).catch(() => {});
|
||||
friday.onEvent(ev).catch(e => console.error('friday bonus', e.message));
|
||||
wednesday.onEvent(ev).catch(e => console.error('wednesday bonus', e.message));
|
||||
sponsorSyncOnEvent(ev).catch(e => console.error('sponsor sync', e.message));
|
||||
}).catch(e => console.error('marks claim', e.message));
|
||||
} });
|
||||
@@ -486,6 +489,10 @@ async function boot() {
|
||||
setTimeout(() => refill.tick().catch(e => console.error('refill', e.message)), 90000);
|
||||
setInterval(() => refill.tick().catch(e => console.error('refill', e.message)), 20 * 60 * 1000);
|
||||
setInterval(() => friday.tick().catch(e => console.error('friday', e.message)), 5 * 60 * 1000);
|
||||
wednesday.init({ dataDir: DATA_DIR, siteConfig, chain, ads, accounts, mailer, drip, marks, rates: () => ads.rates(),
|
||||
telegram: async text => { const sc = siteConfig(); if (!sc.telegramBotToken || !sc.telegramEchoChatId) return false; return telegramSend(sc.telegramEchoChatId, '\u{1F7E0} <b>InstantAdPay</b> · ' + text, sc.telegramEchoTopicId); },
|
||||
notify: async (memberId, subject, text, kind) => { const a = await accounts.byMemberId(memberId); if (!a || !a.email) return; const html = '<p>' + String(text).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/(https:\/\/[^\s]+)/g, '<a href="$1" target="_blank" rel="noopener">$1</a>').split('\n\n').join('</p><p>').replace(/\n/g, '<br>') + '</p>'; await messages.deliver(1, ADMIN_EMAIL || 'house@instantadpay.com', [a.email], subject, html, kind || 'notice'); } });
|
||||
setInterval(() => wednesday.tick().catch(e => console.error('wednesday', e.message)), 5 * 60 * 1000);
|
||||
setInterval(() => snapshot.tick().catch(e => console.error('snapshot', e.message)), 10 * 60 * 1000);
|
||||
tank.init({ dataDir: DATA_DIR, chain, accounts, messages, mailer, site: 'https://instantadpay.com' });
|
||||
await fraud.init({ dataDir: DATA_DIR });
|
||||
@@ -568,6 +575,8 @@ function siteConfig() {
|
||||
fridayPromo: '1', // Five Dollar Friday on/off (Marty, 2026-09-20)
|
||||
fridayBonusPct: '20', // bonus credits on any $5+ package bought on a Friday, Central
|
||||
fridayStart: '2026-09-25', // the first Five Dollar Friday
|
||||
wednesdayPromo: '1', wednesdayBonusPct: '25', wednesdayMinCents: '1000', wednesdayStart: '2026-09-30', // Wired Wednesday (Marty, 2026-09-29)
|
||||
wednesdayNotice: '0', wednesdayKick: '0', // the Tuesday email/notice and the Wednesday Telegram kickoff stay off until Marty approves the copy
|
||||
launchAt: '', // public launch moment, ISO 8601 with offset (e.g. 2026-09-18T19:00:00-05:00): countdown on /launch + dashboard mark
|
||||
aiCreditsPerGen: 10, aiFreeSurge: 20, aiFreeCircuit: 60, aiFreeNexus: 150, // AI Copy Engine: free generations per month by badge, then credits per generation
|
||||
snapshotEnabled: '1', snapshotHourUtc: '14', snapshotTargets: 'feed,echo', // daily growth snapshot: 14 UTC = 9 AM Central; feed = proof channel, echo = shared payments topic
|
||||
@@ -1304,6 +1313,8 @@ const server = http.createServer(async (req, res) => {
|
||||
|
||||
// -- public API
|
||||
if (p === '/api/friday' && req.method === 'GET') return json(res, 200, friday.view(), { 'Cache-Control': 'public, max-age=60' });
|
||||
if (p === '/api/wednesday' && req.method === 'GET') return json(res, 200, wednesday.view(), { 'Cache-Control': 'public, max-age=60' });
|
||||
if (p === '/api/admin/wednesday-previews' && req.method === 'GET') { if (!isAdmin(req)) return json(res, 401, { error: 'auth' }); return json(res, 200, wednesday.previews()); }
|
||||
// -- the pages a member can turn into a viral link (promo tools > Viral links)
|
||||
if (p === '/api/pages' && req.method === 'GET') {
|
||||
const pages = [{ path: '/', title: 'Home page' }, { path: '/blog', title: 'Blog' }, { path: '/earning', title: 'How earning works' }, { path: '/ledger', title: 'Live ledger' }, { path: '/leaderboard', title: 'Leaderboard' }, { path: '/contract', title: 'The contract' }, { path: '/plays', title: 'Team-building plays' }, { path: '/wallets', title: 'Wallet guide' }, { path: '/friday', title: 'Five Dollar Friday' }, { path: '/whats-new', title: "What's new" }, { path: '/shorts', title: 'Shorts' }];
|
||||
@@ -3449,6 +3460,7 @@ const server = http.createServer(async (req, res) => {
|
||||
}
|
||||
if (p === '/wallets') return sendFile(res, path.join(PUBLIC_DIR, 'wallets.html'));
|
||||
if (p === '/friday') return sendFile(res, path.join(PUBLIC_DIR, 'friday.html'));
|
||||
if (p === '/wednesday') return sendFile(res, path.join(PUBLIC_DIR, 'wednesday.html'));
|
||||
if (p === '/plan-lab') return sendFile(res, path.join(PUBLIC_DIR, 'plan-lab.html')); // Reach Ladder simulator for Marty's planning group: unlisted, shared by link (2026-09-27)
|
||||
if (p === '/launch') return sendFile(res, path.join(PUBLIC_DIR, 'launch.html'));
|
||||
if (/^\/view\/[a-f0-9]{32}$/.test(p)) return sendFile(res, path.join(PUBLIC_DIR, 'view.html'));
|
||||
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
// Wired Wednesday (Marty, 2026-09-29). Every Wednesday, Central time, any ad package of $10 or more
|
||||
// earns +25% bonus credits that are WIRED straight into a verified-visits campaign pointed at the
|
||||
// buyer's invite link: the bonus is running before they close the tab, and the network's daily
|
||||
// earners get fresh visit inventory (the one format that keeps selling out). Credited the moment
|
||||
// the purchase indexes, labelled in the credit log, campaign named after the promo.
|
||||
//
|
||||
// Same bones as Five Dollar Friday (friday.js): Central-day window, once per tx, the day's wave on
|
||||
// the bridge page and the Overview card, Telegram at every ten packs, a wrap-up after midnight.
|
||||
// The Tuesday notice + email and the Wednesday kickoff post are OFF until Marty approves the copy
|
||||
// (wednesdayNotice / wednesdayKick settings), because both are outward-facing.
|
||||
//
|
||||
// Settings (siteConfig): wednesdayPromo '1'|'0', wednesdayBonusPct (25), wednesdayMinCents (1000),
|
||||
// wednesdayStart 'YYYY-MM-DD' (first Wednesday, 2026-09-30), wednesdayNotice '1'|'0', wednesdayKick '1'|'0'.
|
||||
'use strict';
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
let X = {}, FILE = null, S = null;
|
||||
const TZ = 'America/Chicago';
|
||||
const SITE = 'https://instantadpay.com';
|
||||
const dayOf = ts => new Date(ts).toLocaleDateString('en-CA', { timeZone: TZ });
|
||||
const weekdayOf = ts => new Date(ts).toLocaleDateString('en-US', { timeZone: TZ, weekday: 'short' });
|
||||
const hourOf = ts => Number(new Date(ts).toLocaleString('en-US', { timeZone: TZ, hour: 'numeric', hour12: false }));
|
||||
const isWednesday = ts => weekdayOf(ts) === 'Wed';
|
||||
|
||||
function init(opts) { X = opts; FILE = path.join(opts.dataDir, 'wednesday.json'); S = load(); }
|
||||
function load() { try { return JSON.parse(fs.readFileSync(FILE, 'utf8')); } catch (e) { return { granted: {}, posts: {}, sent: {} }; } }
|
||||
function save() { try { fs.writeFileSync(FILE, JSON.stringify(S)); } catch (e) {} }
|
||||
// shared across the two app copies that overlap during a deploy (marks.js); true when nobody else has it
|
||||
async function claimOnce(key) { try { return X.marks ? await X.marks.claim(key) : true; } catch (e) { return true; } }
|
||||
|
||||
function cfg() {
|
||||
const c = (X.siteConfig && X.siteConfig()) || {};
|
||||
return {
|
||||
on: String(c.wednesdayPromo == null ? '1' : c.wednesdayPromo) === '1',
|
||||
pct: Math.max(0, Number(c.wednesdayBonusPct) || 25),
|
||||
minCents: Math.max(0, Number(c.wednesdayMinCents) || 1000),
|
||||
start: String(c.wednesdayStart || '2026-09-30'),
|
||||
notice: String(c.wednesdayNotice || '0') === '1',
|
||||
kick: String(c.wednesdayKick || '0') === '1',
|
||||
};
|
||||
}
|
||||
function nextWednesday(now) {
|
||||
const t0 = now || Date.now();
|
||||
for (let d = 0; d < 8; d++) { const ts = t0 + d * 86400000; if (isWednesday(ts) && dayOf(ts) >= cfg().start) return dayOf(ts); }
|
||||
return null;
|
||||
}
|
||||
function labelOf(dayKey) { const [y, m, d] = dayKey.split('-').map(Number); return new Date(Date.UTC(y, m - 1, d, 12)).toLocaleDateString('en-US', { month: 'long', day: 'numeric', timeZone: 'UTC' }); }
|
||||
function liveNow(now) { const c = cfg(); const t = now || Date.now(); return c.on && isWednesday(t) && dayOf(t) >= c.start; }
|
||||
|
||||
// every qualifying purchase on a Central day, from the chain index (never a marketing counter)
|
||||
function purchasesOn(dayKey) {
|
||||
const min = cfg().minCents, out = [];
|
||||
try { for (const ev of X.chain.recentEvents(1e9)) if (ev.type === 'Purchase' && ev.priceCents >= min && dayOf(ev.ts) === dayKey) out.push(ev); } catch (e) {}
|
||||
return out;
|
||||
}
|
||||
function paidOn(dayKey) {
|
||||
let wei = 0n, n = 0;
|
||||
try { for (const ev of X.chain.recentEvents(1e9)) if ((ev.type === 'TierPaid' || ev.type === 'AwardPaid') && dayOf(ev.ts) === dayKey) { wei += BigInt(ev.amountWei); n++; } } catch (e) {}
|
||||
return { pol: Number(wei / 10n ** 14n) / 10000, n };
|
||||
}
|
||||
function stats(dayKey) {
|
||||
const day = dayKey || dayOf(Date.now());
|
||||
const p = purchasesOn(day); const paid = paidOn(day);
|
||||
const usd = p.reduce((s, e) => s + e.priceCents, 0) / 100;
|
||||
const buyers = new Set(p.map(e => e.buyerId)).size;
|
||||
const g = Object.values(S.granted || {}).filter(x => x.day === day);
|
||||
return { day, packs: p.length, usd, buyers, polPaid: paid.pol, payouts: paid.n,
|
||||
bonusCredits: g.reduce((s, x) => s + x.bonus, 0), visits: g.reduce((s, x) => s + (x.visits || 0), 0), campaigns: g.filter(x => x.campaignId).length };
|
||||
}
|
||||
function view() {
|
||||
const c = cfg(); const now = Date.now(); const live = liveNow(now); const next = nextWednesday(now);
|
||||
return { on: c.on, pct: c.pct, minUsd: c.minCents / 100, live, today: live ? stats(dayOf(now)) : null, nextWednesday: next, nextLabel: next ? labelOf(next) : null, start: c.start };
|
||||
}
|
||||
|
||||
// the bonus: once per purchase tx, on a Wednesday on or after the start, packs of $10 and up.
|
||||
// Credits are added, then the same amount is spent on a verified-visits pack aimed at the buyer's
|
||||
// invite link, so the member's own balance is untouched and the bonus is live immediately. If the
|
||||
// pack cannot be created (below the visit minimum, or a validation refusal) the credits stay on
|
||||
// the balance and the notice says so; nothing is ever lost.
|
||||
async function onEvent(ev) {
|
||||
if (!ev || ev.type !== 'Purchase' || !liveNow(ev.ts) || ev.priceCents < cfg().minCents) return null;
|
||||
if (S.granted[ev.tx]) return null;
|
||||
const c = cfg(); const bonus = Math.round((Number(ev.creditAmount) || 0) * c.pct / 100);
|
||||
if (bonus <= 0) return null;
|
||||
const a = await X.accounts.byMemberId(ev.buyerId); if (!a || !a.email) return null;
|
||||
const usd = ('$' + (ev.priceCents / 100).toFixed(2)).replace(/\.00$/, '');
|
||||
const ref = 'ww:' + String(ev.tx).slice(0, 30);
|
||||
await X.ads.addEarned(a.email, bonus, { log: { kind: 'bonus', note: 'Wired Wednesday: +' + c.pct + '% on your ' + usd + ' package, wired into a verified-visits campaign', ref } });
|
||||
S.granted[ev.tx] = { day: dayOf(ev.ts), memberId: ev.buyerId, bonus, at: Date.now() }; save();
|
||||
// wire it: a visits pack for as many verified visits as the bonus buys
|
||||
const perVisit = Number((X.rates && X.rates().visitCostPerVisit) || 3);
|
||||
const count = Math.floor(bonus / perVisit);
|
||||
const link = SITE + '/join/' + (a.username || a.code || ev.buyerId);
|
||||
let made = null, why = '';
|
||||
try {
|
||||
const r = await X.ads.createCampaign(a.email, ev.buyerId, { type: 'visits', name: 'Wired Wednesday: verified visits to my invite', targetUrl: link, count, title: 'Wired Wednesday bonus' }, [ev.buyerId]);
|
||||
if (r && !r.error) { made = r.campaign || r; S.granted[ev.tx].campaignId = made.id; S.granted[ev.tx].visits = count; save(); }
|
||||
else why = (r && r.error) || 'could not create the campaign';
|
||||
} catch (e) { why = e.message; }
|
||||
const text = made
|
||||
? 'Your ' + usd + ' package landed on a Wired Wednesday, so ' + bonus + ' bonus credits (+' + c.pct + '%) were wired straight into a verified-visits campaign: ' + count + ' real visits to your invite link, already running. Watch it under Campaigns: ' + SITE + '/my#campaigns'
|
||||
: 'Your ' + usd + ' package landed on a Wired Wednesday, so ' + bonus + ' bonus credits (+' + c.pct + '%) were added to your balance. We could not start the visits campaign for you automatically (' + why + '), so the credits are yours to spend on any format: ' + SITE + '/my#campaigns';
|
||||
try { await X.notify(ev.buyerId, 'Wired Wednesday: +' + bonus + ' bonus credits' + (made ? ', already running' : ''), text, 'notice'); } catch (e) {}
|
||||
if (!made) console.warn('wednesday: campaign not created for member', ev.buyerId, why);
|
||||
// the wave, every ten packs
|
||||
const st = stats(dayOf(ev.ts));
|
||||
if (st.packs > 0 && st.packs % 10 === 0 && !S.posts[st.day + ':' + st.packs]) {
|
||||
S.posts[st.day + ':' + st.packs] = Date.now(); save();
|
||||
X.telegram('\u{26A1} <b>Wired Wednesday</b> · <b>' + st.packs + ' packs</b> so far today from ' + st.buyers + ' buyers, <b>' + st.visits.toLocaleString() + ' verified visits</b> wired to their invite pages, <b>' + st.polPaid.toFixed(2) + ' POL</b> paid to members in the same transactions.\nEvery $' + (c.minCents / 100) + '+ pack today gets +' + c.pct + '% wired in: ' + SITE + '/my#buy').catch(() => {});
|
||||
}
|
||||
return bonus;
|
||||
}
|
||||
|
||||
// Tuesday 18:00 CT notice + email (when approved), Wednesday 09:00 CT kickoff (when approved),
|
||||
// Thursday 00:xx CT wrap-up of the Wednesday that just ended
|
||||
async function tick() {
|
||||
const c = cfg(); if (!c.on) return;
|
||||
const now = Date.now(); const day = dayOf(now); const wd = weekdayOf(now); const h = hourOf(now);
|
||||
const next = nextWednesday(now);
|
||||
if (c.notice && wd === 'Tue' && h >= 18 && next && !S.sent['tue:' + next] && await claimOnce('wed:tue:' + next)) {
|
||||
S.sent['tue:' + next] = now; save();
|
||||
await broadcast('Tomorrow is Wired Wednesday', noticeText(c));
|
||||
}
|
||||
if (c.kick && wd === 'Wed' && h >= 9 && day >= c.start && !S.sent['kick:' + day] && await claimOnce('wed:kick:' + day)) {
|
||||
S.sent['kick:' + day] = now; save();
|
||||
X.telegram(kickoffText(c)).catch(() => {});
|
||||
}
|
||||
if (wd === 'Thu' && h < 3) {
|
||||
const wed = dayOf(now - 86400000);
|
||||
if (isWednesday(now - 86400000) && wed >= c.start && !S.sent['wrap:' + wed] && await claimOnce('wed:wrap:' + wed)) {
|
||||
S.sent['wrap:' + wed] = now; save();
|
||||
const st = stats(wed);
|
||||
X.telegram('\u{1F3C1} <b>Wired Wednesday wrap-up</b> (' + labelOf(wed) + ')\n<b>' + st.packs + ' packs</b> from ' + st.buyers + ' buyers · $' + st.usd.toFixed(0) + ' in ad packages · <b>' + st.polPaid.toFixed(2) + ' POL</b> paid to members · ' + st.bonusCredits.toLocaleString() + ' bonus credits wired into ' + st.visits.toLocaleString() + ' verified visits'
|
||||
+ '\nNext one is a week away: ' + SITE + '/my#buy').catch(() => {});
|
||||
}
|
||||
}
|
||||
}
|
||||
function noticeText(c) {
|
||||
return 'Tomorrow is Wired Wednesday on InstantAdPay.\n\nAny ad package of $' + (c.minCents / 100) + ' or more bought on Wednesday (Central time, midnight to midnight) earns +' + c.pct + '% bonus credits, and here is the twist: the bonus is wired straight into a verified-visits campaign pointed at your invite link. Real people, on your page, before you close the tab. Nothing to set up, nothing to claim.\n\nYour pack still pays your sponsor line the second it clears, and your line’s packs pay you.\n\nLine up your pack: ' + SITE + '/my#buy\nHow it works: ' + SITE + '/wednesday';
|
||||
}
|
||||
function kickoffText(c) {
|
||||
return '\u{26A1} <b>It’s Wired Wednesday.</b> Any ad package from $' + (c.minCents / 100) + ' up earns <b>+' + c.pct + '% credits</b> today, wired straight into a verified-visits campaign for your invite link, running before you close the tab. Every pack pays its sponsor line in the same transaction. Buy yours: ' + SITE + '/my#buy';
|
||||
}
|
||||
// on-site notice + email to every active member (quiet 45+ days skipped, drip unsubscribes honoured)
|
||||
async function broadcast(subject, text) {
|
||||
let all = []; try { all = await X.accounts.listAll(5000); } catch (e) { return; }
|
||||
const now = Date.now(); let n = 0;
|
||||
for (const a of all) {
|
||||
if (!a.email) continue;
|
||||
if (now - (a.lastSeen || a.created || 0) > 45 * 86400000) continue;
|
||||
try { await X.notify(a.memberId, subject, text, 'notice'); } catch (e) {}
|
||||
try { if (X.mailer && X.mailer.hasKey() && !(X.drip && await X.drip.isUnsubscribed(a.email))) { await X.mailer.send(a.email, subject, text + '\n\nInstantAdPay'); n++; } } catch (e) {}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
// what Marty reviews before switching the notice and kickoff on
|
||||
function previews() { const c = cfg(); return { notice: { subject: 'Tomorrow is Wired Wednesday', text: noticeText(c) }, kickoff: kickoffText(c).replace(/<[^>]+>/g, '') }; }
|
||||
|
||||
module.exports = { init, cfg, view, stats, onEvent, tick, liveNow, nextWednesday, isWednesday, labelOf, previews };
|
||||
Reference in New Issue
Block a user