218bb10145
- promodays.js: reusable date-to-percent bonus map (setting promoDays, kill switch promoDaysOn), once per tx via marks (MySQL): Fri 11-27 +40% $5+, Sat/Sun +20% $5+, Mon 11-30 +30% $20+. A mapped Friday is paid by friday.js at max(fridayBonusPct, day pct), one bonus per tx, Game Pass Friday perk intact; Five Dollar Friday +20% resumes 12-04 with no hand edits. - friday.js: Thanksgiving Thursday 18:00 CT notice + email carry the Black Friday copy (one message); Black Friday kickoff and wrap-up copy; /api/friday reports the day's real pct and name; IAP_TEST_NOW test clock (ignored in production). - Weekend Starter Bundle ($20+ in the window: LinkSpin code WEEKEND500 on a purchase notice) and Builder Bundle ($100+: notice + GET /api/network/weekend-builders for DownlineHydra, X-Weekend-Key = env WEEKEND_BUNDLE_KEY, constant-time compare). - promos.js: promo_codes.starts (dormant-until gate) for code NETWORKWEEKEND. - gamepass.js: tier passes paid by a package Fri 11-27 00:00 CT to Fri 12-04 00:00 CT get Explorer/Champion +15 days, Legend +60. - /weekend deals page (assets/weekend.js), Home strip + Overview card (assets/weekend-card.js), network ribbon (netdeals.js + assets/netweekend.js via common.js and netline.js), chatbot fact + answer date-gated. - Share hosts: /weekend, /friday and other page names are pages, not usernames (email links use instantadpay.link: instantadpay.com is still on the Spamhaus DBL, checked 11-17). - welcome.js says the day's real pct; common.js/netline.js/welcome.js ?v=20261117nw. - Tests: qa/promodays.test.cjs (12) + qa/weekend.e2e.mjs (18) at test clocks; bash qa/run.sh weekend; member walk clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
3.9 KiB
JavaScript
37 lines
3.9 KiB
JavaScript
// "Part of the network" footer line for pages that do not load common.js (Marty 2026-11-14 trust pack): company line + the network
|
|
// list from the hub (/api/network-sites, built-in copy if it does not answer). The current site comes from data-site on this tag.
|
|
(function () {
|
|
var me = (document.currentScript && document.currentScript.getAttribute('data-site')) || 'iap';
|
|
var FALLBACK = [['iap', 'InstantAdPay', 'https://instantadpay.com'], ['linkspin', 'LinkSpin', 'https://linkspin.app'], ['dlb', 'Downline Banners', 'https://downlinebanners.com'],
|
|
['vbb', 'Viral Banner Blitz', 'https://viralbannerblitz.com'], ['stackpol', 'Stack POL', 'https://stackpol.com'], ['earnerscorner', 'Earners Corner', 'https://earnerscorner.com']].map(function (a) { return { id: a[0], name: a[1], url: a[2] }; });
|
|
// the links carry a referral username (Marty 2026-11-15): the signed-in member's own, else the sponsor this visitor came in on
|
|
// (iap.sponsor cookie, usernames only). Tracked links get it as s1 (LinkSpin sends it on as ?ref=), plain links as ?ref=; Earners Corner none.
|
|
function okRef(v) { return /^[A-Za-z0-9_.-]{1,40}$/.test(v) && !/^\d+$/.test(v) && !/^0x[0-9a-f]{40}$/i.test(v) && v !== 'company' && v !== 'top'; }
|
|
function refCookie() { var m = document.cookie.match(/(?:^|;\s*)iap\.sponsor=([^;]*)/); try { var v = m ? decodeURIComponent(m[1]) : ''; return okRef(v) ? v : ''; } catch (e) { return ''; } }
|
|
function withRef(s, ref) {
|
|
var href = s.go || s.url; if (!ref || s.id === 'earnerscorner') return href;
|
|
try { var u = new URL(href); u.searchParams.set(s.go ? 's1' : 'ref', ref); return u.toString(); } catch (e) { return href; }
|
|
}
|
|
function esc(s) { return String(s).replace(/[&<>"]/g, function (c) { return { '&': '&', '<': '<', '>': '>', '"': '"' }[c]; }); }
|
|
function run() {
|
|
var f = document.querySelector('footer'); if (!f || f.querySelector('.netline')) return;
|
|
var hasLegal = !!f.querySelector('a[href="/terms"]'); // decided once, before this line adds its own links
|
|
var host = f.querySelector('.wrap') || f;
|
|
var box = document.createElement('div'); box.className = 'netline';
|
|
box.style.cssText = 'flex-basis:100%;width:100%;margin-top:10px;display:flex;gap:6px 14px;flex-wrap:wrap;align-items:baseline;font-size:12.5px';
|
|
host.appendChild(box);
|
|
var list = FALLBACK, ref = refCookie();
|
|
var paint = function () {
|
|
box.innerHTML = (hasLegal ? '' : '<span style="flex-basis:100%"><a href="/terms">Terms</a> · <a href="/disclaimer">Earnings Disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="/contract">Contract</a> · <a href="/ledger">Ledger</a> · <a href="/support">Support</a></span>') + '<span style="flex-basis:100%">© 2026 TrustClickz</span><b>Part of the network</b><span>One account across the network:</span>' + list.map(function (s) {
|
|
return s.id === me ? '<span aria-current="page" style="font-weight:700">' + esc(s.name) + ' (you are here)</span>' : '<a href="' + esc(withRef(s, ref)) + '" target="_blank" rel="noopener nofollow">' + esc(s.name) + '</a>';
|
|
}).join('');
|
|
};
|
|
paint();
|
|
fetch('/api/network-sites').then(function (r) { return r.json(); }).then(function (l) { if (Array.isArray(l) && l.length) { list = l; paint(); } }).catch(function () {});
|
|
fetch('/api/me', { credentials: 'same-origin' }).then(function (r) { return r.json(); }).then(function (m) { if (m && m.signedIn && m.username && okRef(m.username)) { ref = m.username; paint(); } }).catch(function () {});
|
|
}
|
|
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', run); else run();
|
|
// Network Weekend ribbon (2026-11-17): date-gated inside netweekend.js; loaded once even when common.js loads it too
|
|
if (!document.querySelector('script[src^="/assets/netweekend.js"]')) { var t = document.createElement('script'); t.src = '/assets/netweekend.js?v=20261117nw'; t.defer = true; t.setAttribute('data-site', me); document.head.appendChild(t); }
|
|
})();
|