4787390e8b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
2.5 KiB
JavaScript
25 lines
2.5 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] }; });
|
|
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 paint = function (list) {
|
|
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%">TrustClickz · 615 Green Valley Drive, Moody, AL 35004</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(s.go || s.url) + '" target="_blank" rel="noopener nofollow">' + esc(s.name) + '</a>';
|
|
}).join('');
|
|
};
|
|
paint(FALLBACK);
|
|
fetch('/api/network-sites').then(function (r) { return r.json(); }).then(function (l) { if (Array.isArray(l) && l.length) paint(l); }).catch(function () {});
|
|
}
|
|
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', run); else run();
|
|
})();
|