9d1ab5e2c3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
335 lines
34 KiB
JavaScript
335 lines
34 KiB
JavaScript
// Writes public/*.html from one place (one source of copy + legal facts per site). Run after editing: node tools/pages.mjs
|
|
// Copy rules: no em dashes, no income promises ("Ad credits buy advertising, not income."), never an earnings cap,
|
|
// wallets = "SafePal or any other crypto wallet", one-time Boosts, never a subscription. Numbers that Marty has not set are
|
|
// filled in live from /api/config by the page scripts (data-cfg spans) and labelled as proposals there.
|
|
import fs from 'node:fs';
|
|
import path from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
const PUB = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'public');
|
|
const SITE = 'https://viraladsource.com';
|
|
const V = { css: 1, common: 1, page: 1, chat: 1 };
|
|
const F = { co: 'TrustClickz', addr: '615 Green Valley Drive, Moody, AL 35004', updated: 'November 16, 2026' };
|
|
const FONTS = 'https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@500&display=swap';
|
|
const I = n => `<img src="/art/icons/${n}.svg" alt="" width="34" height="34">`;
|
|
const cfg = (k, d) => `<span data-cfg="${k}">${d}</span>`; // filled from /api/config
|
|
|
|
function head(o) {
|
|
const t = o.title, d = o.desc, url = SITE + o.path;
|
|
return `<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
|
<title>${t}</title>
|
|
<meta name="description" content="${d}">
|
|
${o.noindex ? '<meta name="robots" content="noindex">' : `<link rel="canonical" href="${url}">`}
|
|
<meta property="og:type" content="website"><meta property="og:site_name" content="ViralAdSource">
|
|
<meta property="og:title" content="${t}"><meta property="og:description" content="${d}"><meta property="og:url" content="${url}">
|
|
<meta property="og:image" content="${SITE}/art/og-share.png"><meta property="og:image:width" content="1200"><meta property="og:image:height" content="630">
|
|
<meta property="og:image:alt" content="ViralAdSource: every ad has a source">
|
|
<meta name="twitter:card" content="summary_large_image"><meta name="twitter:image" content="${SITE}/art/og-share.png">
|
|
${o.ld ? '<script type="application/ld+json">' + JSON.stringify(o.ld) + '</script>\n' : ''}<meta name="theme-color" content="#0B2730">
|
|
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
|
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link rel="stylesheet" href="${FONTS}">
|
|
<link rel="stylesheet" href="/assets/vas.css?v=${V.css}">
|
|
</head>
|
|
<body${o.bodyClass ? ' class="' + o.bodyClass + '"' : ''} data-nav="${o.nav || ''}">
|
|
`;
|
|
}
|
|
const tail = scripts => '<script src="/assets/common.js?v=' + V.common + '"></script>\n<script src="/assets/chat.js?v=' + V.chat + '" defer></script>\n' + scripts.map(s => '<script src="/assets/' + s + '?v=' + V.page + '"></script>').join('\n') + '\n</body>\n</html>\n';
|
|
const page = (file, o, body, scripts) => fs.writeFileSync(path.join(PUB, file), head(o) + body + tail(scripts));
|
|
|
|
const REWARDS = `
|
|
<div class="cards">
|
|
<div class="card-ink c1">${I('wallet')}<p class="step">Level 1 · POL, same transaction</p>
|
|
<h3>A Boost sold through your branch</h3>
|
|
<p>The buyer came in through your reshare link. The contract pays you ${cfg('cut', '20%')} of that Boost in POL in the same transaction as the sponsor line. Nobody holds it; anyone can check it on Polygonscan.</p></div>
|
|
<div class="card-ink c2">${I('verify-shield-check')}<p class="step">Level 2 · POL from the reward pot</p>
|
|
<h3>A verified new member from your branch</h3>
|
|
<p>Someone brand new to the whole network joins through your link and confirms their email. Once the checks pass, ${cfg('signup', '$0.25')} in POL is paid from the reward pot to your wallet, up to ${cfg('cap', '10')} a day. Bigger tiers are credited at once and withdrawable after ${cfg('lockDays', '14')} days.</p>
|
|
<p data-cfg="payoutsNote" class="mono" style="font-size:13px"></p></div>
|
|
<div class="card-ink c3">${I('ledger-list')}<p class="step">Level 3 · ad credits</p>
|
|
<h3>Real views from your branch</h3>
|
|
<p>Views are the easiest thing to fake, so they earn ad space only: ${cfg('creditsPer', '10')} credits per ${cfg('creditsViews', '100')} verified views, spent on your own ad. Ad credits buy advertising, not income.</p></div>
|
|
</div>
|
|
<h3 style="margin:44px 0 0;font-family:var(--h);font-weight:800;font-size:30px;color:#fff">How a reward is verified</h3>
|
|
<ol class="verify">
|
|
<li><b>1</b><p>Every reshare link is unique to the resharer, so each click carries whose branch it came from.</p></li>
|
|
<li><b>2</b><p>The result happens: a Boost is bought on chain, or a new member confirms their email.</p></li>
|
|
<li><b>3</b><p>Real-time checks: brand new on the network hub, not the resharer's own device, IP or wallet, no throwaway email, daily cap, fraud score.</p></li>
|
|
<li><b>4</b><p>The site signs a voucher for the reward. The contract checks the signature and pays. Voucher and payment both show on the public ledger.</p></li>
|
|
</ol>
|
|
<p style="margin:22px 0 0;max-width:760px">Where the POL comes from: ${cfg('pot', '10%')} of every Boost goes into the reward pot by the contract, so rewards can never exceed what came in. Visits alone never create new money. <span data-cfg="proposalNote"></span></p>`;
|
|
|
|
// ---------------------------------------------------------------- front page
|
|
page('index.html', { path: '/', nav: '/', title: 'ViralAdSource | Every ad has a source. Watch yours travel.',
|
|
desc: 'Post a text ad free. Anyone can reshare it with their own link, and every reshare grows a new branch. See the whole family tree of your ad: who passed it on, how far it went, where the views came from.',
|
|
ld: { '@context': 'https://schema.org', '@graph': [{ '@type': 'WebSite', name: 'ViralAdSource', url: SITE + '/' }, { '@type': 'Organization', name: 'ViralAdSource', url: SITE + '/', logo: SITE + '/art/icon-192.png' }] } }, `<main id="main">
|
|
<div class="hero" role="img" aria-label="A spring at the source branching into coral streams across a map">
|
|
<section class="wrap">
|
|
<div class="copy">
|
|
<p class="kicker">Part of the Crypto Team Build Network</p>
|
|
<h1>Every ad has a source. Watch yours travel.</h1>
|
|
<p class="lead">Post a text ad free. Anyone can reshare it to their own people, and every reshare grows a new branch. You see the whole family tree of your ad: who passed it on, how far it went, where the views came from.</p>
|
|
<div class="row" style="margin-top:30px"><a class="btn coral" href="/my#post">Post your first ad free</a><a class="btn" href="#how">See how it spreads</a></div>
|
|
<p class="muted" style="margin:18px 0 0;font-size:14px">One free account across the network. Sign in with InstantAdPay or LinkSpin.</p>
|
|
</div>
|
|
<div class="spacer" aria-hidden="true"></div>
|
|
</section>
|
|
</div>
|
|
|
|
<section id="how" class="topo"><div class="wrap">
|
|
<h2>How an ad spreads from its source</h2>
|
|
<p style="margin:10px 0 0;max-width:680px">Not five levels down your own team. Out through anyone who thinks it is worth passing on.</p>
|
|
<div class="cards">
|
|
<div class="card-ink">${I('post-write')}<p class="step">01 · Post</p><h3>Write your ad at the source</h3><p>A headline, two lines and your link. One active ad is free. Your link can be a LinkSpin spin link so every click is tracked.</p></div>
|
|
<div class="card-ink">${I('reshare')}<p class="step">02 · Reshare</p><h3>Others pass it on</h3><p>Members reshare ads they like to their own pages and lists with their reshare link. Each reshare is a new branch on your tree.</p></div>
|
|
<div class="card-ink">${I('branch')}<p class="step">03 · Credit flows back</p><h3>Resharers are rewarded for results</h3><p>Real views earn ad credits. A verified new member or a Boost sold through a branch pays that resharer in POL on Polygon. Shares alone never pay: results do.</p></div>
|
|
</div>
|
|
<div class="stats" id="todayStats" aria-label="Today on ViralAdSource"></div>
|
|
</div></section>
|
|
|
|
<section id="board" class="band"><div class="wrap">
|
|
<div class="row" style="justify-content:space-between"><h2>The reshare board</h2><a class="btn sm" href="/boost">Boost your ad to the top</a></div>
|
|
<p class="muted" style="margin:8px 0 0">Boosted ads first, then this week's movers by new reshares and verified clicks. Open an ad to reshare it with your own link.</p>
|
|
<div class="ads" id="boardAds"><p class="muted">Loading the board...</p></div>
|
|
</div></section>
|
|
|
|
<section id="featured" class="wrap" hidden><h2 style="font-size:26px">Featured with credits</h2><p class="muted" style="margin:6px 0 0">Members who earned ad credits through their reshares spend them here.</p><div class="ads"></div></section>
|
|
|
|
<section id="post" class="band"><div class="wrap split">
|
|
<div>
|
|
<h2>Post at the source, track it in LinkSpin</h2>
|
|
<p class="lead" style="font-size:17px">Point your ad at one of your LinkSpin spin links. One free ad then rotates every page you promote, and every branch of your tree shows up in your LinkSpin Reports as its own source.</p>
|
|
<ul class="ticks">
|
|
<li>Only your own spin links can be picked. LinkSpin confirms it on every save.</li>
|
|
<li>Each reshare link tags the click with the resharer, so LinkSpin shows which branch brought each sign-up.</li>
|
|
<li>Sign in once with InstantAdPay or LinkSpin. Your network account already works here.</li>
|
|
</ul>
|
|
</div>
|
|
<div class="panel"><p style="margin:0;font-weight:600">Your ad's family tree, live</p>
|
|
<p class="muted" style="margin:6px 0 0">Most ad sites give you a view count. Here you see the route: which reshare carried your ad furthest, which branch went quiet, and which page of yours the clicks landed on.</p>
|
|
<ul class="ticks"><li>Branch by branch: who reshared, when, and what each branch brought in</li><li>Furthest reach: how many steps from the source</li><li>Clicks by page when your link is a LinkSpin spin link</li></ul>
|
|
<div class="row" style="margin-top:16px"><a class="btn ink" href="/my#post">Post my free ad</a><a class="btn" href="/my#tree">See my tree</a></div></div>
|
|
</div></section>
|
|
|
|
<section id="rewards" class="topo"><div class="wrap">
|
|
<h2>Three ways a reshare is rewarded</h2>
|
|
<p style="margin:10px 0 0;max-width:720px">A share alone is never paid, because anyone can claim a share. What your branch actually causes is paid, and the bigger the result, the stronger the proof.</p>
|
|
${REWARDS}
|
|
</div></section>
|
|
|
|
<section class="band" style="background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line)"><div class="wrap split" style="align-items:center">
|
|
<div><h2>Boost the source</h2>
|
|
<p style="color:var(--ink3)">Want a head start? A Boost puts your ad at the top of the reshare board for ${cfg('boostDays', '7')} days, so more people see it and pass it on. One-time, never a subscription.</p>
|
|
<p style="color:var(--ink3)">Paid in POL by smart contract with SafePal or any other crypto wallet. The split is in the contract and every payment is on the public ledger.</p></div>
|
|
<div class="panel pale"><p class="kicker" style="color:var(--muted)">Boost</p><p style="margin:0;font:800 48px var(--h)">${cfg('boostUsd', '$5')}</p><p class="muted" style="margin:0">paid once in POL at the live rate <span data-cfg="proposalTag"></span></p>
|
|
<ul class="ticks"><li>Top of the reshare board for ${cfg('boostDays', '7')} days</li><li>${cfg('levels', '5 x 5%')}: sponsor line share, paid in the same transaction</li><li>${cfg('cut', '20%')} to the resharer whose branch sold it, ${cfg('pot', '10%')} to the reward pot</li><li>Proof on Polygon, linked from the ledger</li></ul>
|
|
<a class="btn coral" style="width:100%;margin-top:18px" href="/boost">Boost my ad</a></div>
|
|
</div></section>
|
|
|
|
<section id="ledger" class="band"><div class="wrap"><div class="cards" style="margin-top:0">
|
|
<div class="panel"><h3 style="margin:0 0 6px;font-size:19px">Already a ViralAdSource member?</h3><p style="margin:0;color:var(--ink3)">Sign in with your network account. Your account came across by email and your sponsor was kept.</p></div>
|
|
<div class="panel"><h3 style="margin:0 0 6px;font-size:19px"><a href="/ledger">Live ledger</a></h3><p style="margin:0;color:var(--ink3)">Every Boost and every split, each linked to its Polygon transaction, and every sign-up reward.</p></div>
|
|
<div class="panel" id="hunt"><h3 style="margin:0 0 6px;font-size:19px">Hunt it on PolHunter</h3><p style="margin:0;color:var(--ink3)">A find code hides in one of the three "How an ad spreads" steps.</p></div>
|
|
</div></div></section>
|
|
</main>
|
|
`, ['front.js']);
|
|
|
|
// ---------------------------------------------------------------- an ad through a reshare link
|
|
page('ad.html', { path: '/s/', nav: '', noindex: true, title: 'An ad on ViralAdSource', desc: 'A text ad on ViralAdSource. Reshare it with your own link and grow a new branch.' }, `<main id="main" class="wrap" style="padding-top:40px;padding-bottom:56px">
|
|
<p class="kicker" id="chain">On ViralAdSource</p>
|
|
<div id="adBox"><p class="muted">Loading the ad...</p></div>
|
|
<div class="split" style="margin-top:28px">
|
|
<div class="panel" id="reshareBox">
|
|
<h2 style="font-size:28px">Pass it on</h2>
|
|
<p class="muted" style="margin:8px 0 0">Reshare this ad with your own link. Your link is unique to you, so everything that comes through it is booked to your branch. A share alone is never paid: only verified results are.</p>
|
|
<div id="reshareOut" style="margin-top:14px"></div>
|
|
<div class="row" style="margin-top:14px"><button class="btn ink" id="reshareBtn" type="button">Reshare this ad</button><a class="btn" href="/rewards">How rewards work</a></div>
|
|
<p id="status" class="note" hidden></p>
|
|
</div>
|
|
<div class="panel">
|
|
<h2 style="font-size:28px">New to the network?</h2>
|
|
<p class="muted" style="margin:8px 0 0">Join free with one account for every network site, then post your own ad here and watch it travel.</p>
|
|
<div class="row" style="margin-top:14px"><a class="btn coral" id="joinBtn" href="/join">Join free</a><a class="btn" href="/my">I have an account</a></div>
|
|
</div>
|
|
</div>
|
|
<section id="featured" hidden style="margin-top:32px"><h2 style="font-size:24px">Featured with credits</h2><div class="ads"></div></section>
|
|
</main>
|
|
`, ['adpage.js']);
|
|
|
|
// ---------------------------------------------------------------- my ad tree (dashboard)
|
|
page('my.html', { path: '/my', nav: '/my', noindex: true, title: 'My ad tree | ViralAdSource', desc: 'Your ad, its family tree, your reshare links, ad credits and rewards.' }, `<main id="main" class="wrap" style="padding-top:36px;padding-bottom:56px">
|
|
<h1 style="font-size:clamp(32px,5vw,48px)">My ad tree</h1>
|
|
<section id="signin" class="panel" style="margin-top:22px" hidden>
|
|
<h2 style="font-size:26px">Sign in</h2>
|
|
<p class="muted" style="margin:8px 0 0">Use your network account (one account across the network), or sign with your wallet: a free signature that cannot move funds.</p>
|
|
<div class="row" style="margin-top:16px"><a class="btn ink" href="/sso/start?mode=go&to=/my">Sign in with my network account</a><button class="btn" id="walletBtn" type="button">Sign in with my wallet</button></div>
|
|
<p class="muted" style="font-size:14px;margin:12px 0 0">Wallet: SafePal or any other crypto wallet on Polygon. Not a member yet? <a id="joinLink" href="https://instantadpay.com/join">Join free</a>.</p>
|
|
</section>
|
|
<div id="dash" hidden>
|
|
<p class="muted" id="who" style="margin:8px 0 0"></p>
|
|
<div class="stats" id="myStats"></div>
|
|
<div class="dash">
|
|
<section class="panel" id="post">
|
|
<h2 style="font-size:26px" id="adTitle">Post your free ad</h2>
|
|
<form class="stack" id="adForm" style="margin-top:12px" autocomplete="off">
|
|
<label class="f">Headline <small>3 to <span data-cfg="headline">60</span> characters</small><input type="text" id="headline" maxlength="60" required></label>
|
|
<label class="f">First line<input type="text" id="line1" maxlength="90" required></label>
|
|
<label class="f">Second line <small>optional</small><input type="text" id="line2" maxlength="90"></label>
|
|
<label class="f">Your link <small>an https page that loads, or one of your own LinkSpin spin links</small><input type="url" id="link" placeholder="https://" required></label>
|
|
<div class="picker" id="picker"><div class="ph"><span>Use one of my spin links</span><button type="button" class="btn sm" id="loadSpins" style="min-height:30px">Show my spin links</button></div><div id="spinList"></div></div>
|
|
<label class="row" style="gap:8px;font-size:14px"><input type="checkbox" id="track" checked> Track clicks with LinkSpin (a tracked link on your own LinkSpin account)</label>
|
|
<button class="btn coral" type="submit" id="saveAd">Post my free ad</button>
|
|
</form>
|
|
<p id="status" class="note" hidden></p>
|
|
<div id="sourceBox" hidden style="margin-top:14px"><p style="margin:0 0 6px;font-weight:600">Your source link</p><div class="sharebox"><span id="sourceUrl"></span><button class="btn sm" type="button" id="copySource">Copy</button></div></div>
|
|
</section>
|
|
<section class="panel" id="tree">
|
|
<div class="row" style="justify-content:space-between"><h2 style="font-size:26px">Family tree</h2><span class="chip" id="treeChip">no ad yet</span></div>
|
|
<div class="stats" id="treeStats"></div>
|
|
<div class="tbl"><table><thead><tr><th>Branch</th><th>Step</th><th>Reshares under it</th><th>Views</th><th>Clicks</th><th>Sign-ups</th><th>Boosts</th></tr></thead><tbody id="treeRows"><tr><td colspan="7" class="muted">Post your ad, then share your source link. Every reshare shows up here.</td></tr></tbody></table></div>
|
|
<p class="muted" style="font-size:13px;margin:10px 0 0">Views and clicks are verified (one per visitor per 24 hours). Sign-ups are new network members who confirmed their email. When your link is a LinkSpin link, LinkSpin Reports split clicks and sign-ups by branch (s2 = resharer, s3 = reshare link).</p>
|
|
</section>
|
|
<section class="panel">
|
|
<h2 style="font-size:26px">Ads I reshared</h2>
|
|
<div class="tbl"><table><thead><tr><th>Ad</th><th>Step</th><th>Views</th><th>Clicks</th><th>Sign-ups</th><th>Boosts</th><th>Link</th></tr></thead><tbody id="myShares"><tr><td colspan="7" class="muted">Open any ad on the <a href="/#board">reshare board</a> and tap "Reshare this ad".</td></tr></tbody></table></div>
|
|
</section>
|
|
<section class="panel">
|
|
<h2 style="font-size:26px">Credits and rewards</h2>
|
|
<div class="stats" id="rewardStats"></div>
|
|
<p class="muted" style="font-size:14px" id="rewardNote"></p>
|
|
<div class="tbl"><table><thead><tr><th>When</th><th>What</th><th>Amount</th><th>Status</th></tr></thead><tbody id="rewardRows"><tr><td colspan="4" class="muted">Nothing yet.</td></tr></tbody></table></div>
|
|
<p class="muted" style="font-size:13px">Ad credits buy advertising, not income. Nothing is promised.</p>
|
|
</section>
|
|
</div>
|
|
<div class="row" style="margin-top:22px"><button class="btn sm" id="logout" type="button">Sign out</button><button class="btn sm" id="logoutAll" type="button">Sign out everywhere</button></div>
|
|
</div>
|
|
</main>
|
|
`, ['wallet.js', 'my.js']);
|
|
|
|
// ---------------------------------------------------------------- boost
|
|
page('boost.html', { path: '/boost', nav: '/boost', title: 'Boost your ad | ViralAdSource', desc: 'A one-time Boost puts your ad at the top of the reshare board. Paid in POL; the contract splits it in the same transaction.' }, `<main id="main">
|
|
<div class="hero slim"><section class="wrap"><div class="copy"><p class="kicker">One-time, never a subscription</p><h1>Boost the source</h1>
|
|
<p class="lead">A Boost puts your ad at the top of the reshare board for ${cfg('boostDays', '7')} days per Boost, so more people see it and pass it on.</p></div><div class="spacer" aria-hidden="true"></div></section></div>
|
|
<section class="band"><div class="wrap split">
|
|
<div class="panel pale">
|
|
<p class="kicker" style="color:var(--muted)">Boost <span data-cfg="proposalTag"></span></p><p style="margin:0;font:800 48px var(--h)">${cfg('boostUsd', '$5')}</p><p class="muted" style="margin:0" id="quote">paid once in POL at the live rate</p>
|
|
<label class="f" style="margin-top:16px">How many<select id="qty"><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>10</option></select></label>
|
|
<button class="btn coral" style="width:100%;margin-top:16px" id="buy" type="button">Boost my ad</button>
|
|
<p id="status" class="note" hidden></p>
|
|
</div>
|
|
<div>
|
|
<h2 style="font-size:28px">Where the POL goes</h2>
|
|
<p style="color:var(--ink3)">The VASShop contract splits every Boost in the buyer's own transaction. Nobody holds it.</p>
|
|
<div class="tbl"><table><tbody id="splitRows"></tbody></table></div>
|
|
<p class="muted" style="font-size:14px">Sponsor levels pay people in your network sponsor line who have bought a Boost; anyone who has not is passed over and the share goes up the line (up to 20 places). A level nobody qualifies for goes to the company. If you did not arrive through someone's reshare link, the resharer share goes to the company.</p>
|
|
<p class="muted" style="font-size:14px">Pay with SafePal or any other crypto wallet on Polygon. Anything you send above the exact price comes back in the same transaction. A Boost buys advertising, not income.</p>
|
|
</div>
|
|
</div></section>
|
|
</main>
|
|
`, ['wallet.js', 'buy.js', 'boost.js']);
|
|
|
|
// ---------------------------------------------------------------- rewards
|
|
page('rewards.html', { path: '/rewards', nav: '/rewards', title: 'How resharers are rewarded | ViralAdSource', desc: 'A share alone is never paid. Boosts sold, verified new members and real views through your branch are, and every reward is checked first.' }, `<main id="main">
|
|
<section class="topo"><div class="wrap">
|
|
<p class="kicker" style="color:var(--mint)">Results only</p><h1 style="color:#fff">Three ways a reshare is rewarded</h1>
|
|
<p style="margin:14px 0 0;max-width:720px">A share alone is never paid, because anyone can claim a share. What your branch actually causes is paid, and the bigger the result, the stronger the proof.</p>
|
|
${REWARDS}
|
|
</div></section>
|
|
<section class="band"><div class="wrap split">
|
|
<div><h2 style="font-size:30px">What can hold a sign-up reward</h2>
|
|
<ul class="ticks"><li>The person was already in the network (on any network site).</li><li>Their email was never confirmed, or it is a throwaway address.</li><li>The sign-up came from your own device or connection.</li><li>You reached the daily cap.</li><li>The sign-up looks automated: filled in seconds, many from one connection.</li></ul>
|
|
<p class="muted">A held sign-up is looked at by a person. A rejected one never pays.</p></div>
|
|
<div class="panel"><h2 style="font-size:26px">Where to see it</h2><p class="muted">Your rewards and credits are on <a href="/my">My ad tree</a>. Every paid reward and every Boost split is on the <a href="/ledger">public ledger</a> with its Polygon transaction.</p></div>
|
|
</div></section>
|
|
</main>
|
|
`, ['static.js']);
|
|
|
|
// ---------------------------------------------------------------- join + confirm
|
|
page('join.html', { path: '/join', nav: '', noindex: true, title: 'Join the network free | ViralAdSource', desc: 'One free account for every network site.' }, `<main id="main" class="wrap" style="padding-top:40px;padding-bottom:56px;max-width:720px">
|
|
<h1 style="font-size:clamp(32px,5vw,46px)">Join the network free</h1>
|
|
<p class="lead" id="viaNote">One free account for every network site: InstantAdPay, LinkSpin, ViralAdSource and the rest.</p>
|
|
<form class="panel stack" id="joinForm" style="margin-top:22px" autocomplete="on">
|
|
<label class="f">Email <small>we send one link to confirm it</small><input type="email" id="email" required autocomplete="email"></label>
|
|
<label class="f">Username <small>optional, 3 to 30 letters or numbers</small><input type="text" id="username" maxlength="30" autocomplete="username"></label>
|
|
<button class="btn coral" type="submit">Join free</button>
|
|
<p class="muted" style="font-size:13px;margin:0">By joining you agree to the <a href="/terms">Terms</a> and <a href="/privacy">Privacy</a>. Already have a network account? <a href="/my">Sign in</a>.</p>
|
|
</form>
|
|
<p id="status" class="note" hidden></p>
|
|
</main>
|
|
`, ['join.js']);
|
|
page('confirm.html', { path: '/confirm', nav: '', noindex: true, title: 'Confirm your email | ViralAdSource', desc: 'Confirm your free network account.' }, `<main id="main" class="wrap" style="padding-top:40px;padding-bottom:56px;max-width:720px">
|
|
<h1 style="font-size:clamp(32px,5vw,46px)">Confirming your email</h1>
|
|
<p id="status" class="note">One moment...</p>
|
|
<div class="row" style="margin-top:16px"><a class="btn ink" href="/my">Sign in</a><a class="btn" href="/">Front page</a></div>
|
|
</main>
|
|
`, ['join.js']);
|
|
|
|
// ---------------------------------------------------------------- ledger + contract
|
|
page('ledger.html', { path: '/ledger', nav: '/ledger', title: 'Live ledger | ViralAdSource', desc: 'Every Boost, every split and every sign-up reward on ViralAdSource, each with its Polygon transaction.' }, `<main id="main" class="wrap" style="padding-top:40px;padding-bottom:56px">
|
|
<p class="kicker">Proof, not promises</p><h1 style="font-size:clamp(32px,5vw,48px)">Live ledger</h1>
|
|
<div class="stats" id="ledStats"></div>
|
|
<section class="panel" style="margin-top:22px"><h2 style="font-size:26px">Boosts and their splits</h2>
|
|
<div class="tbl"><table><thead><tr><th>When</th><th>Buyer</th><th>Paid</th><th>Resharer</th><th>Sponsor levels</th><th>Reward pot</th><th>Company</th><th>Proof</th></tr></thead><tbody id="rows"><tr><td colspan="8" class="muted">No Boosts yet.</td></tr></tbody></table></div></section>
|
|
<section class="panel" style="margin-top:22px"><h2 style="font-size:26px">Sign-up rewards</h2><p class="muted" id="payNote" style="margin:6px 0 0"></p>
|
|
<div class="tbl"><table><thead><tr><th>When</th><th>Resharer</th><th>Kind</th><th>Amount</th><th>Status</th><th>Proof</th></tr></thead><tbody id="rrows"><tr><td colspan="6" class="muted">No rewards yet.</td></tr></tbody></table></div></section>
|
|
</main>
|
|
`, ['ledger.js']);
|
|
page('contract.html', { path: '/contract', nav: '', title: 'The contract | ViralAdSource', desc: 'VASShop on Polygon: who it pays, the reward pot and its rules, live from the chain.' }, `<main id="main" class="wrap" style="padding-top:40px;padding-bottom:56px">
|
|
<p class="kicker">VASShop on Polygon</p><h1 style="font-size:clamp(32px,5vw,48px)">The contract</h1>
|
|
<p class="lead">Every Boost is paid to the contract, which splits it in the same transaction. Sign-up rewards come only from the reward pot, which only Boosts fill.</p>
|
|
<section class="panel" style="margin-top:22px"><div class="tbl"><table><tbody id="facts"><tr><td class="muted">Loading...</td></tr></tbody></table></div></section>
|
|
<section class="panel" style="margin-top:22px"><h2 style="font-size:24px">The rules it enforces</h2>
|
|
<ul class="ticks"><li>Every purchase needs an order signed by the site's keeper key, naming the buyer's sponsor line and the resharer. Each order can be used once.</li>
|
|
<li>The resharer cut, the sponsor levels, the reward pot slice and the company are paid in the buyer's own transaction. A payment that cannot be delivered waits in the contract for that wallet to claim.</li>
|
|
<li>A sign-up reward needs a keeper-signed voucher, used once, under the per-reward cap and the per-wallet daily cap, and never more than the pot holds.</li>
|
|
<li>No proxy, no owner withdrawal of the pot, no self-destruct. The owner is Marty's Tangem hardware wallet.</li></ul></section>
|
|
</main>
|
|
`, ['contract.js']);
|
|
|
|
// ---------------------------------------------------------------- promote + admin
|
|
page('promote.html', { path: '/promote', nav: '', title: 'Promote ViralAdSource | Promo kit', desc: 'Links, creatives and copy for ViralAdSource with your network username.' }, `<main id="main" class="wrap" style="padding-top:40px;padding-bottom:56px">
|
|
<p class="kicker">Promo kit</p><h1 style="font-size:clamp(32px,5vw,48px)">Promote ViralAdSource</h1>
|
|
<p class="lead">Your links, creatives and copy, filled in with your network username.</p>
|
|
<label class="f" style="max-width:360px;margin-top:18px">Your network username<input type="text" id="kitUser" placeholder="username"></label>
|
|
<div id="kit" style="margin-top:22px"></div>
|
|
</main>
|
|
`, ['promote.js']);
|
|
page('admin.html', { path: '/admin', nav: '', noindex: true, title: 'Admin | ViralAdSource', desc: 'Admin.' }, `<main id="main" class="wrap" style="padding-top:30px;padding-bottom:56px">
|
|
<h1 style="font-size:36px">Admin</h1>
|
|
<div class="row" style="margin-top:12px"><input type="text" id="tok" placeholder="admin token" style="max-width:320px"><button class="btn sm ink" id="go" type="button">Load</button></div>
|
|
<section class="panel" style="margin-top:18px"><h2 style="font-size:22px">Status</h2><pre id="statusOut" style="white-space:pre-wrap;font-size:12px;max-height:420px;overflow:auto"></pre></section>
|
|
<section class="panel" style="margin-top:18px"><h2 style="font-size:22px">Sign-ups (L2 checks)</h2><div class="tbl"><table><thead><tr><th>Id</th><th>Status</th><th>Email</th><th>Resharer</th><th>Checks</th><th>Action</th></tr></thead><tbody id="suRows"></tbody></table></div></section>
|
|
<section class="panel" style="margin-top:18px"><h2 style="font-size:22px">Pending-rewards ledger</h2><div class="tbl"><table><thead><tr><th>Id</th><th>To</th><th>Kind</th><th>Cents</th><th>Status</th><th>Voucher</th></tr></thead><tbody id="rwRows"></tbody></table></div></section>
|
|
<section class="panel" style="margin-top:18px" id="testBox"><h2 style="font-size:22px">Staging: mark a test member</h2><p class="muted">Staging only. Lets a wallet post and reshare without a real network account.</p>
|
|
<div class="row"><input type="text" id="tAddr" placeholder="0x wallet" style="max-width:420px"><input type="text" id="tName" placeholder="username" style="max-width:200px"><button class="btn sm" id="tGo" type="button">Mark</button></div><p id="status" class="note" hidden></p></section>
|
|
</main>
|
|
`, ['admin.js']);
|
|
|
|
// ---------------------------------------------------------------- legal (TrustClickz)
|
|
const legal = (file, p, title, body) => page(file, { path: p, nav: '', bodyClass: 'legal', title: title + ' | ViralAdSource', desc: title + ' for ViralAdSource, run by ' + F.co + '.' },
|
|
`<main id="main" class="wrap" style="padding-top:40px;padding-bottom:56px"><p class="kicker">Updated ${F.updated}</p><h1 style="font-size:clamp(32px,5vw,46px)">${title}</h1>${body}
|
|
<p>${F.co}, ${F.addr}. Questions: <a href="https://instantadpay.com/support?from=viraladsource">network support</a>.</p></main>
|
|
`, ['static.js']);
|
|
legal('terms.html', '/terms', 'Terms', `
|
|
<p>ViralAdSource (viraladsource.com) is run by ${F.co}, ${F.addr}. By using the site you agree to these terms.</p>
|
|
<h2>Accounts</h2><p>You sign in with your network account or your wallet. One free text ad per member. You keep your wallet's keys; nobody here will ever ask for your recovery phrase.</p>
|
|
<h2>Your ad and your link</h2><p>Your ad and link must be yours or ones you have the right to use and must lead to a lawful page that loads. No adult content, malware, phishing, deceptive offers, hate or anything illegal where you or your visitors live. No link shorteners other than your own LinkSpin spin links. We can pause or remove an ad that breaks these rules.</p>
|
|
<h2>Reshares</h2><p>Anyone can reshare a live ad with their own reshare link. Resharing never earns anything by itself. Rewards are given only for the verified results described on the Rewards page and only after the checks there pass. We can hold, reject or reverse a reward we believe came from fraud, self-dealing, automation or a duplicate person, and we can close accounts that try.</p>
|
|
<h2>Ad credits</h2><p>Ad credits are advertising on this site for your own ad. They have no cash value, cannot be sold, transferred or withdrawn, and can expire if the program changes.</p>
|
|
<h2>Boosts and payments</h2><p>A Boost is a one-time purchase paid in POL on Polygon through the VASShop smart contract, which splits the payment in the same transaction as shown on the Contract page. Blockchain payments are final and cannot be refunded or reversed. Nothing here is a subscription.</p>
|
|
<h2>No promise of income</h2><p>What you buy is advertising. We do not promise any income, views, sign-ups or results. See the Earnings Disclaimer.</p>
|
|
<h2>Changes</h2><p>We can change these terms and the program's numbers going forward; a change never alters a payment already made on chain.</p>`);
|
|
legal('disclaimer.html', '/disclaimer', 'Earnings Disclaimer', `
|
|
<p>ViralAdSource sells advertising. Ad credits buy advertising, not income. Nothing is promised.</p>
|
|
<p>Any POL paid to resharers or sponsors depends entirely on what other people choose to buy or do. Most people earn nothing or very little. Do not spend money you cannot afford to lose, and never treat a Boost as an investment.</p>
|
|
<p>Crypto prices change. A reward or payment priced in dollars is paid in POL at the price when it is paid; its value can go down afterwards. Network fees apply to every transaction.</p>
|
|
<p>Any example on this site is an illustration of how the contract splits a payment, not a prediction of what you will receive.</p>`);
|
|
legal('privacy.html', '/privacy', 'Privacy', `
|
|
<p>${F.co} runs ViralAdSource. Here is what we keep and why.</p>
|
|
<h2>What we keep</h2><ul><li>Your wallet address and network username, to run your account and pay what the contract pays.</li><li>Your text ad and the reshare links you make, with their counts.</li><li>For someone who joins here: their email (to confirm it and to create their network account), the reshare link they came through, and hashed device and connection keys used for fraud checks. We never store raw IP addresses.</li><li>Visit and click records with hashed visitor keys, kept 15 days, to count verified views and clicks.</li></ul>
|
|
<h2>Sharing</h2><p>Your account is part of the network: your username, wallet and sponsor are shared with the network hub so one account works on every network site. We do not sell personal data. Blockchain transactions are public by nature.</p>
|
|
<h2>Your choices</h2><p>Ask network support to delete your data; the network hub removes it from every network site, except what the blockchain or the law keeps.</p>`);
|
|
console.log('pages written');
|