Files
martbost 6616680fc6 WebWorthIt staging: read-only contract + website check (Marty 2026-11-16)
Free check (DeepSeek v4.1 Flash scorecard) and deep report (Opus 5.5) over a generalised
evidence pack from the read-only chain tools; fact gate blocks any address, tx or number not
in the evidence; MySQL store; hub sign-in, sponsor line recorder, vouchers, ad slots in iframes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:54:08 -06:00

63 lines
6.4 KiB
JavaScript

// Shared page parts: header, staging line, footer (network row from /api/network-sites, legal links, the public-info + opinion line),
// ad slots (each third-party tag runs inside its own iframe, /f/n.html; never inside a scorecard, findings or a report body).
var WWI = (function () {
'use strict';
var $ = function (id) { return document.getElementById(id); };
var esc = function (s) { return String(s == null ? '' : s).replace(/[&<>"']/g, function (c) { return { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]; }); };
var cfg = null;
function getConfig() { if (!cfg) cfg = fetch('/api/config').then(function (r) { return r.json(); }).catch(function () { return {}; }); return cfg; }
function post(url, body) { return fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body || {}) }).then(function (r) { return r.json().then(function (j) { j._status = r.status; return j; }); }); }
var MARK = '<svg width="34" height="34" viewBox="0 0 34 34" aria-hidden="true"><circle cx="14" cy="14" r="10" fill="none" stroke="#0E2A22" stroke-width="2.5"></circle><path d="M8 16 L12 12 L15 15 L20 9" fill="none" stroke="#E2541B" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21.5 21.5 L30 30" stroke="#0E2A22" stroke-width="3" stroke-linecap="round"></path></svg>';
function header() {
var h = document.createElement('div'); h.className = 'hdr';
h.innerHTML = '<div class="wrap"><a class="brand" href="/">' + MARK + '<span>WebWorthIt</span></a>'
+ '<nav class="nav" aria-label="Main"><a href="/#check">Run a check</a><a href="/#scoring">How scoring works</a><a href="/#network">Our own contracts</a><a href="/#reports">Deep reports</a><a href="/#ec">Earners Corner</a></nav>'
+ '<a id="signin" class="btn dark" href="/sso/start?mode=go&amp;to=%2Fmy">Sign in with the network</a></div>';
document.body.insertBefore(h, document.body.firstChild);
getConfig().then(function (c) {
if (c.staging) { var s = document.createElement('div'); s.className = 'staging'; s.textContent = 'STAGING: test site. Payments arrive at launch. Nothing here moves money.'; document.body.insertBefore(s, document.body.firstChild); }
if (c.member) { var a = $('signin'); a.href = '/my'; a.textContent = c.member.username ? '@' + c.member.username : 'My checks'; }
});
}
var NET = [['iap', 'InstantAdPay', 'https://instantadpay.com'], ['linkspin', 'LinkSpin', 'https://linkspin.app'], ['dlb', 'Downline Banners', 'https://downlinebanners.com'],
['vbb', 'Viral Banner Blitz', 'https://viralbannerblitz.com'], ['viraladblitz', 'ViralAdBlitz', 'https://viraladblitz.com'], ['downlinehydra', 'DownlineHydra', 'https://downlinehydra.com'],
['fivex', '5xYourTeam', 'https://5xyourteam.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] }; });
var HERE = { id: 'webworthit', name: 'WebWorthIt', url: 'https://webworthit.com' };
function netLine(el) {
var paint = function (list) {
el.innerHTML = '<b>Part of the network</b> &middot; One account across the network: ' + list.map(function (s) {
return s.id === 'webworthit' ? '<span class="here" aria-current="page">' + esc(s.name) + '</span>' : '<a href="' + esc(s.go || s.url) + '" target="_blank" rel="noopener nofollow">' + esc(s.name) + '</a>';
}).join(' &middot; ');
};
paint(NET.concat([HERE]));
fetch('/api/network-sites').then(function (r) { return r.json(); }).then(function (l) { if (Array.isArray(l) && l.length) paint(l.some(function (s) { return s.id === 'webworthit'; }) ? l : l.concat([HERE])); }).catch(function () {});
}
function footer() {
slot(null, 'foot', 728, 90, true);
var f = document.createElement('footer'); f.className = 'foot';
f.innerHTML = '<div class="wrap"><div class="top"><span>WebWorthIt is part of the Crypto Team Build Network. Every check uses only public information anyone can review on their own. Scores are our opinion, not financial advice. We score code and chain records, not people.</span><span class="mono">webworthit.com</span></div>'
+ '<p style="margin:0"><a href="/terms">Terms and Conditions</a> &middot; <a href="/privacy">Privacy Policy</a> &middot; <a href="/disclaimer">Disclaimer</a> &middot; <a href="/rubric">The rubric</a> &middot; <a href="https://instantadpay.com/support?from=webworthit" target="_blank" rel="noopener">Support</a></p>'
+ '<p style="margin:0">&copy; 2026 TrustClickz</p><p class="netline" style="margin:0"></p></div>';
document.body.appendChild(f);
netLine(f.querySelector('.netline'));
var s = document.createElement('script'); s.src = '/assets/chat.js?v=1'; s.defer = true; document.body.appendChild(s);
var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = '/assets/chat.css?v=1'; document.head.appendChild(l);
}
// an ad slot: <div class="slot"> with the small "Advertisement" label and an iframe to our own frame page, which loads the LinkSpin zone.
// after = element to insert after (null = before the footer). Placement key -> zone id comes from WWI_ZONES (server); no zone, no slot.
function slot(after, key, w, h, beforeFooter) {
getConfig().then(function (c) {
var z = c.zones && c.zones[key]; if (!z) return;
var narrow = window.innerWidth < 760 && w > 320; var ww = narrow ? 320 : w, hh = narrow ? 50 : h;
var zn = narrow && c.zones[key + 'm'] ? c.zones[key + 'm'] : z;
var d = document.createElement('div'); d.className = 'slot wrap'; d.setAttribute('data-zone', key);
d.innerHTML = '<div class="lab">Advertisement</div><iframe title="Advertisement" loading="lazy" width="' + ww + '" height="' + hh + '" sandbox="allow-scripts allow-popups allow-popups-to-escape-sandbox allow-same-origin" src="/f/n.html?z=' + encodeURIComponent(zn) + '"></iframe>';
if (after && after.parentNode) after.parentNode.insertBefore(d, after.nextSibling);
else if (beforeFooter) { var f = document.querySelector('footer.foot'); if (f) f.parentNode.insertBefore(d, f); else document.body.appendChild(d); }
});
}
var short = function (a) { return a && a.length === 42 ? a.slice(0, 6) + '...' + a.slice(-4) : a; };
return { $: $, esc: esc, getConfig: getConfig, post: post, header: header, footer: footer, slot: slot, short: short };
})();
document.addEventListener('DOMContentLoaded', function () { WWI.header(); WWI.footer(); });