Network Weekend (Marty 2026-11-17): Boost views from the live VABShop SKU on every page, quote and chatbot, the network ribbon
chainskus.js reads skus(1) every 60 s and keeps C.boost in step (BOOST_VIEWS stays the normal 500 as normalViews), so a $5 Boost shows 750 once the owner signs setSku and 500 before or after; crediting already follows the Purchase event's views. common.js rewrites the pages' static '500 guaranteed views' copy to the live number only when the chain differs. weekend.js: the Fri 11-27 00:00 CT to Tue 12-01 00:00 CT gate (WEEKEND_NOW test clock) for the dated chatbot fact; the ribbon line (netdeals.setLocal) only exists while the chain really holds the weekend Boost. chatcore render hook, live intro. qa/weekend.test.mjs 18 pass, chatbot 206, smoke 197. common.js?v=9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+26
-6
@@ -13,7 +13,9 @@
|
||||
const core = require('./chatcore');
|
||||
const C = require('./config').get();
|
||||
|
||||
const KNOWLEDGE_DATE = '2026-11-15';
|
||||
const KNOWLEDGE_DATE = '2026-11-17';
|
||||
const weekend = require('./weekend'); // Network Weekend (2026-11-17): dated fact, from the live chain Boost (C.boost follows chainskus.js)
|
||||
if (C.boost.normalViews == null) { C.boost.normalViews = C.boost.views; C.boost.normalUsd = C.boost.usd; } // before the first chain read
|
||||
const URL_ = 'https://' + C.site;
|
||||
const SUPPORT = 'https://instantadpay.com/support';
|
||||
const B = C.boost, SP = C.split;
|
||||
@@ -98,15 +100,33 @@ const FACTS = () => [
|
||||
'- SPONSOR LINE: from the network hub (same sponsor as InstantAdPay/LinkSpin). On the first Boost the keeper signs the line and the contract records it link by link; a recorded link never changes. People without a wallet in the network are left out.',
|
||||
'- TRUST: ' + URL_ + '/ledger (every Boost, every level paid, who was passed over, delivery), ' + URL_ + '/contract (live contract facts), toasts of real events, a Telegram card per Boost. Terms ' + URL_ + '/terms, Earnings Disclaimer ' + URL_ + '/disclaimer, Privacy ' + URL_ + '/privacy. Run by TrustClickz.',
|
||||
'- PROMO: ' + URL_ + '/promote (links, creatives in every common size, copy, all with the member\'s network username). Old ViralAdBlitz referral links open the member\'s new page; old balances were not carried.',
|
||||
'- NO REFUNDS: blockchain payments are final; views left on a removed ad\'s Boosts are not delivered or refunded. SUPPORT for account or purchase problems: network support at ' + SUPPORT + ' (InstantAdPay runs the one desk for every network site).'
|
||||
].join('\n');
|
||||
'- NO REFUNDS: blockchain payments are final; views left on a removed ad\'s Boosts are not delivered or refunded. SUPPORT for account or purchase problems: network support at ' + SUPPORT + ' (InstantAdPay runs the one desk for every network site).',
|
||||
weekendFact()
|
||||
].filter(Boolean).join('\n');
|
||||
|
||||
// Network Weekend (Black Friday to Cyber Monday, Fri 11-27 00:00 CT to Tue 12-01 00:00 CT): only while it runs, and only the
|
||||
// Boost the contract really sells right now
|
||||
function weekendFact() {
|
||||
if (!weekend.on()) return '';
|
||||
return '- NETWORK WEEKEND (Black Friday to Cyber Monday, midnight to midnight Central, ends Monday 11-30 at 11:59 PM Central): '
|
||||
+ (weekend.bonus(C) ? 'a $' + B.usd + ' Boost carries ' + B.views + ' guaranteed views instead of ' + B.normalViews + ', same price, for Boosts bought during the weekend. ' : '')
|
||||
+ 'Other network deals: https://instantadpay.com/weekend';
|
||||
}
|
||||
// instant answers carry the normal Boost views; at answer time say what the contract sells right now
|
||||
function render(t) {
|
||||
if (!weekend.bonus(C)) return t;
|
||||
return String(t).replace(new RegExp('(^|[^0-9,.$])' + B.normalViews + '(?=( guaranteed| views))', 'g'), '$1' + B.views)
|
||||
.replace(new RegExp('\\b(own|your) ' + B.normalViews + '\\b', 'g'), '$1 ' + B.views);
|
||||
}
|
||||
|
||||
const SITE = {
|
||||
id: 'viraladblitz', hubSite: 'viraladblitz', netId: 'viraladblitz', name: 'ViralAdBlitz', url: URL_, supportUrl: SUPPORT, knowledgeDate: KNOWLEDGE_DATE,
|
||||
dataDir: C.dataDir, canned: CANNED, faq: FAQ, facts: FACTS,
|
||||
intro: 'You are the assistant on ViralAdBlitz (' + URL_ + '), the network\'s text-ad site: one free text ad per network member that spreads five levels down their team, and a $' + B.usd + ' Boost for ' + B.views + ' guaranteed views. It is part of a network of sites that share one account.',
|
||||
dataDir: C.dataDir, canned: CANNED, faq: FAQ, facts: FACTS, render,
|
||||
quickTopics: ['How does my ad spread?', 'What is a Boost?', 'Where does the $5 go?', 'What is DownlineHydra?']
|
||||
};
|
||||
|
||||
function init() { return core.init(SITE); }
|
||||
module.exports = { init, handle: core.handle, answer: core.answer, KNOWLEDGE_DATE, CANNED, FAQ, SITE };
|
||||
const INTRO = () => 'You are the assistant on ViralAdBlitz (' + URL_ + '), the network\'s text-ad site: one free text ad per network member that spreads five levels down their team, and a $' + B.usd + ' Boost for ' + B.views + ' guaranteed views. It is part of a network of sites that share one account.';
|
||||
// the intro follows the live Boost too (it was a string fixed at boot)
|
||||
Object.defineProperty(SITE, 'intro', { enumerable: true, get: () => INTRO() });
|
||||
module.exports = { init, handle: core.handle, answer: core.answer, KNOWLEDGE_DATE, CANNED, FAQ, SITE, FACTS, render };
|
||||
|
||||
Reference in New Issue
Block a user