diff --git a/public/art/sample-3xsusu.jpg b/public/art/sample-3xsusu.jpg new file mode 100644 index 0000000..f1f2eeb Binary files /dev/null and b/public/art/sample-3xsusu.jpg differ diff --git a/report.js b/report.js index 6eff64a..1c58723 100644 --- a/report.js +++ b/report.js @@ -137,9 +137,8 @@ function factcheck(report, evidenceText, keyNums) { if (!n.raw.includes('.') && !n.raw.includes(',') && v >= 1990 && v <= 2035) continue; // years if (allowed.has(v) || allowed.has(Number(v.toFixed(2)))) continue; // a rounded form of an allowed value (3,632 for 3,632.30, 29.06k style excluded) - let near = false; - if (v >= 100) for (const a of [v - 1, v, v + 1]) if (allowed.has(Math.round(a))) { near = true; break; } - if (!near && n.raw.includes('.')) { const d = n.raw.split('.')[1].length; for (const x of [v - Math.pow(10, -d), v + Math.pow(10, -d)]) if (allowed.has(Number(x.toFixed(d)))) near = true; } + let near = false; // integers: allowed already holds every allowed value rounded to 0 decimals (3,632 for 3,632.30) + if (n.raw.includes('.')) { const d = n.raw.split('.')[1].length; for (const x of [v - Math.pow(10, -d), v + Math.pow(10, -d)]) if (allowed.has(Number(x.toFixed(d)))) near = true; } if (near) continue; const i = stripped.indexOf(n.raw); bad.push({ kind: 'number', item: n.raw, context: stripped.slice(Math.max(0, i - 60), i + 40).replace(/\s+/g, ' ') }); } diff --git a/website.js b/website.js index 809f7cd..438accd 100644 --- a/website.js +++ b/website.js @@ -7,7 +7,7 @@ const dns = require('dns').promises; const net = require('net'); const EXPLORERS = { 'bscscan.com': 'bsc', 'polygonscan.com': 'polygon', 'etherscan.io': 'eth', 'basescan.org': 'base' }; -const CHAIN_WORDS = { bsc: /\b(bnb ?chain|bsc|binance smart chain|bep-?20|pancakeswap)\b/gi, polygon: /\b(polygon|matic|\bpol\b|polygonscan)\b/gi, +const CHAIN_WORDS = { bsc: /\b(bnb ?(smart )?chain|bsc|binance smart chain|bep-?20|pancakeswap)\b/gi, polygon: /\b(polygon|matic|\bpol\b|polygonscan)\b/gi, eth: /\b(ethereum|erc-?20|etherscan|mainnet eth)\b/gi, base: /\b(base chain|on base|base network|basescan|coinbase base)\b/gi }; const ADDR_RE = /0x[a-fA-F0-9]{40}(?![a-fA-F0-9])/g; const COMMON = new Set(['0x0000000000000000000000000000000000000000', '0x000000000000000000000000000000000000dead',