/* ═══════════════════════════════════════════════════════════════════════ IS THIS REALLY NEUON AI'S WEBSITE? ── the problem this actually solves ── A website cannot be stopped from being copied. Everything a browser draws was sent to that browser to be drawn, and the person at the keyboard owns the browser. Right-click blockers, "no selecting" rules and disabled keyboard shortcuts stop nobody: somebody cloning a site uses wget or httrack and never opens a browser at all. Those tricks only ever inconvenience the honest visitor. So this does not try to stop the copy. It makes the copy USELESS AND LOUD. ── how ── A clone is a faithful copy, which means it copies this file too. On the real address, this does nothing at all. On any other address it: 1. tells the visitor, in front of everything else, that they are not on NEUON AI's website, and gives them the real one; and 2. quietly tells the real server where it is running, so NEUON finds out about the clone from the clone itself, usually before anybody reports it. A scammer can of course delete this file — but they have to know it is here, find it among the site's scripts, and re-copy every time the site changes. Most do not, because most are automated. The point is not to be unbeatable; it is to make the cheap attack fail and the careful one slower and noisier. NOTHING HERE IS A LOCK. It is a smoke alarm. ═══════════════════════════════════════════════════════════════════════ */ (function () { 'use strict'; /* Where this site is genuinely served from. A subdomain of either is fine — staging and previews are still NEUON's. */ var REAL = ['neuon.site', 'neuon.ai']; var HOME = 'https://neuon.site'; var host = String(location.hostname || '').toLowerCase(); /* A developer's own machine is not an impostor. */ function isLocal(h) { return h === 'localhost' || h === '127.0.0.1' || h === '::1' || h === '' || /^192\.168\./.test(h) || /^10\./.test(h) || /^172\.(1[6-9]|2\d|3[01])\./.test(h) || /\.local$/.test(h); } function isOurs(h) { for (var i = 0; i < REAL.length; i++) { if (h === REAL[i] || h.slice(-(REAL[i].length + 1)) === '.' + REAL[i]) return true; } return false; } if (isOurs(host) || isLocal(host)) return; /* ── 1. TELL THE PERSON LOOKING AT IT ── Built here rather than styled from a stylesheet, because the stylesheet is the clone's copy and can be edited. Everything is inline and everything is text — nothing that a clone could quietly neutralise by changing a class. */ function warn() { if (document.getElementById('neuon-not-real')) return; var box = document.createElement('div'); box.id = 'neuon-not-real'; box.setAttribute('role', 'alertdialog'); box.style.cssText = [ 'position:fixed', 'inset:0', 'z-index:2147483647', 'background:#0b1020', 'color:#fff', 'font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,sans-serif', 'display:flex', 'align-items:center', 'justify-content:center', 'padding:6vw', 'text-align:center', ].join(';'); var inner = document.createElement('div'); inner.style.cssText = 'max-width:34rem'; var h = document.createElement('div'); h.textContent = 'This is not NEUON AI’s website.'; h.style.cssText = 'font-size:clamp(1.5rem,5vw,2.2rem);font-weight:800;line-height:1.2;margin-bottom:1rem'; var p = document.createElement('p'); p.textContent = 'You are looking at a copy of it on ' + host + '. NEUON AI Sdn. Bhd. does not run this address, and anything it asks ' + 'you for — money, passwords, or personal details — is not going to NEUON AI.'; p.style.cssText = 'opacity:.88;margin:0 0 1.4rem'; var a = document.createElement('a'); a.href = HOME; a.textContent = 'Go to the real neuon.site →'; a.rel = 'noopener'; a.style.cssText = [ 'display:inline-block', 'background:#0078ff', 'color:#fff', 'text-decoration:none', 'font-weight:700', 'padding:.85rem 1.5rem', 'border-radius:999px', ].join(';'); var small = document.createElement('p'); small.textContent = 'NEUON AI Sdn. Bhd. (Reg. No. 201801046269 (1308301-T)) — Kuching, Sarawak.'; small.style.cssText = 'opacity:.5;font-size:.8rem;margin-top:1.4rem'; inner.appendChild(h); inner.appendChild(p); inner.appendChild(a); inner.appendChild(small); box.appendChild(inner); (document.body || document.documentElement).appendChild(box); /* A clone that removes the warning gets it back. Cheap, and it means the lazy way of defeating this does not work either. */ try { new MutationObserver(function () { if (!document.getElementById('neuon-not-real')) warn(); }).observe(document.documentElement, { childList: true, subtree: true }); } catch (e) { /* very old browser; the warning is still there */ } } if (document.body) warn(); else document.addEventListener('DOMContentLoaded', warn); /* ── 2. TELL NEUON ── sendBeacon with a plain body is a "simple" request: no preflight, nothing to read back, and it survives the page being closed. It carries only where the clone is — no visitor data of any kind. */ try { var say = JSON.stringify({ host: host, href: String(location.href).slice(0, 500) }); if (navigator.sendBeacon) navigator.sendBeacon(HOME + '/api/impostor', say); else fetch(HOME + '/api/impostor', { method: 'POST', body: say, mode: 'no-cors', keepalive: true }); } catch (e) { /* the warning above is the part that matters */ } })();