/* PumpCheck widget - the grade tool on /pumpcheck/.
*
* Extracted from the homepage radar script on Oct 29, 2026, when the Top 10
* buys board took over the hero. Everything here is self-contained: styles,
* history, watch list, drift read and the grade record. It mounts into
* #pumpcheck-app and does nothing on a page that does not provide it.
*/
// ===== PumpCheck: grade any coin before you buy =====
(function(){
try{
// The radar script these lines came from kept these two endpoints in its
// outer scope. Standalone they have to live here, or every fetch throws
// "API is not defined" and the panel sits on "Reading the holder book".
var API='https://superagent-ab39abf3.base44.app/functions/pumpfunRadar';
var BUYERS='https://superagent-ab39abf3.base44.app/functions/pumpBuyers';
// Same helper the board uses: every trade link carries the affiliate ref.
var REF='easynarwhal4921';
function link(mint){return 'https://pump.fun/coin/'+mint+'?ref='+REF;}
var st=document.createElement('style');
st.setAttribute('data-lr','check');
st.textContent=[
'.lr-chk{max-width:980px;margin:22px auto 8px;padding:0 4px}',
'.lr-chk-box{background:#12141c;border:1px solid #262a36;border-radius:14px;padding:16px 16px 14px}',
'.lr-chk-t{color:#fff;font-size:15px;font-weight:700;margin:0 0 2px}',
'.lr-chk-s{color:#9aa0ae;font-size:12px;margin:0 0 12px;display:block;line-height:1.5}',
'.lr-chk-f{display:flex;gap:8px;flex-wrap:wrap}',
'.lr-chk-i{flex:1 1 220px;min-width:0;background:#0b0d12;border:1px solid #2c3140;color:#e8eaf0;border-radius:9px;padding:10px 12px;font-size:13px}',
'.lr-chk-i::placeholder{color:#5f6675}',
'.lr-chk-btn{background:#FF6B1A;color:#111;border:0;border-radius:9px;padding:10px 18px;font-weight:700;font-size:13px;cursor:pointer}',
'.lr-chk-btn[disabled]{opacity:.6;cursor:default}',
'.lr-chk-o{margin-top:12px}',
'.lr-chk-g{display:flex;gap:12px;align-items:flex-start;flex-wrap:wrap}',
'.lr-chk-gr{width:54px;height:54px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800;color:#0b0d12;flex:0 0 auto}',
'.lr-g-a{background:#2ecc71}.lr-g-b{background:#8fd14f}.lr-g-c{background:#f1c40f}.lr-g-d{background:#ff8a3d}.lr-g-e{background:#ff5a3c;color:#fff}.lr-g-f{background:#e33b2e;color:#fff}.lr-g-q{background:#4a5163;color:#fff}',
'.lr-chk-mn{flex:1 1 200px;min-width:0}',
'.lr-chk-sym{color:#fff;font-weight:700;font-size:15px}',
'.lr-chk-hl{color:#cfd3dd;font-size:13px;margin-top:2px}',
'.lr-chk-vd{color:#8d93a1;font-size:12px;margin-top:4px}',
'.lr-chk-k{display:grid;grid-template-columns:repeat(auto-fit,minmax(112px,1fr));gap:8px;margin-top:12px}',
'.lr-chk-kk{background:#0b0d12;border:1px solid #232734;border-radius:9px;padding:8px 10px}',
'.lr-chk-kl{display:block;color:#7d8391;font-size:10px;letter-spacing:.04em;text-transform:uppercase}',
'.lr-chk-kv{display:block;color:#fff;font-size:13px;font-weight:700;margin-top:2px}',
'.lr-chk-ks{display:block;color:#5d6373;font-size:9.5px;margin-top:3px;line-height:1.35}',
'.lr-chk-fresh{font-size:9.5px;color:#5d6373;margin-top:3px}',
'.lr-chk-drift{font-size:10.5px;font-weight:700;margin-top:6px;padding:4px 8px;border-radius:6px;display:inline-block}',
'.lr-chk-drift-up{background:rgba(46,204,113,.12);color:#4ade80;border:1px solid rgba(46,204,113,.35)}',
'.lr-chk-drift-dn{background:rgba(227,59,46,.12);color:#ff7b6b;border:1px solid rgba(227,59,46,.35)}',
'.lr-chk-sum{background:none;border:1px solid #3a3f4d;color:#ff8a3d;font:inherit;font-size:11px;padding:5px 9px;border-radius:7px;cursor:pointer}',
'.lr-chk-sum:hover{border-color:#FF6B1A;color:#fff}',
'.lr-chk-live{background:rgba(255,107,26,.13);border:1px solid rgba(255,107,26,.42);color:#ffb27a;font-size:11px;border-radius:8px;padding:8px 10px;margin-top:9px;line-height:1.4}',
'.lr-chk-live b{color:#ff8a3d}',
'.lr-chk-help{margin-top:10px;border-top:1px solid #232734;padding-top:9px}',
'.lr-chk-help summary{cursor:pointer;font-size:11px;color:#8a90a0;font-weight:600;list-style:none}',
'.lr-chk-help summary::-webkit-details-marker{display:none}',
'.lr-chk-help summary:before{content:"+ ";color:#ff8a3d;font-weight:800}',
'.lr-chk-help[open] summary:before{content:"\u2212 "}',
'.lr-chk-helpb{font-size:11px;color:#8a90a0;line-height:1.55;margin-top:7px}',
'.lr-chk-helpb p{margin:0 0 7px}',
'.lr-chk-helpb b{color:#e8eaf0}',
'.lr-chk-src{font-size:9.5px;color:#4d5362;margin-top:9px}',
'.lr-chk-again{margin-top:8px}',
'.lr-chk-retry{background:none;border:1px solid #3a3f4d;color:#ff8a3d;font:inherit;font-size:11px;padding:5px 10px;border-radius:7px;cursor:pointer}',
'.lr-chk-retry:hover{border-color:#FF6B1A;color:#fff}',
'.lr-wl{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin-top:9px}',
'.lr-wl-l{font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;color:#5d6373}',
'.lr-wl-c{display:inline-flex;align-items:center;gap:4px;background:#1a1d24;border:1px solid #2b2f3b;color:#c9cedb;font:inherit;font-size:11px;padding:3px 7px;border-radius:20px;cursor:pointer}',
'.lr-wl-c:hover{border-color:#FF6B1A;color:#fff}',
'.lr-wl-x{background:none;border:0;color:#5d6373;font:inherit;font-size:10px;cursor:pointer;text-decoration:underline;padding:2px 4px}',
'.lr-watch{margin-top:6px;background:none;border:1px solid #2b2f3b;color:#8a90a0;font:inherit;font-size:11px;padding:4px 9px;border-radius:20px;cursor:pointer}',
'.lr-watch:hover{border-color:#FF6B1A;color:#fff}',
'.lr-watch-on{border-color:#FF6B1A;color:#ff8a3d}',
'.lr-chk-mail{margin-top:10px}',
'.lr-chk-mail button{display:block;width:100%;background:none;border:1px dashed #3a3f4d;color:#ff8a3d;font:inherit;font-size:11px;padding:7px 9px;border-radius:8px;cursor:pointer}',
'.lr-chk-mail button:hover{border-color:#FF6B1A;color:#fff}',
'.lr-chk-fl{color:#ff8a3d;font-size:11px;margin-top:10px}',
'.lr-chk-by{margin-top:11px;border:1px solid #23262e;border-radius:10px;padding:10px 11px;background:#101216}',
'.lr-chk-byt{font-size:9.5px;letter-spacing:.7px;color:#6d7484;text-transform:uppercase;font-weight:800}',
'.lr-chk-byv{font-size:12.5px;font-weight:700;margin-top:4px;line-height:1.35}',
'.lr-chk-byn{display:flex;gap:12px;margin-top:7px;flex-wrap:wrap}',
'.lr-chk-byn b{display:block;font-size:13px;color:#e8eaee;line-height:1.15}',
'.lr-chk-byn span{font-size:9.5px;color:#727a89;letter-spacing:.3px}',
'.lr-chk-byv.a{color:#8fe6a6}.lr-chk-byv.b{color:#e6d98f}.lr-chk-byv.c{color:#c8ccd6}.lr-chk-byv.d{color:#ff9b7a}',
'.lr-chk-er{color:#ff8a3d;font-size:12px;margin-top:10px}',
'.lr-chk-ft{color:#6f7583;font-size:11px;margin-top:10px;line-height:1.5}',
'.lr-chk-rec{color:#9aa0ae;font-size:11px;margin-top:10px;padding-top:10px;border-top:1px solid #232734;line-height:1.5}',
'.lr-chk-rec b{color:#ff8a3d}',
'.lr-chk-sp{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px solid #232734}',
'.lr-chk-sp i{font-style:normal;font-size:11px;font-weight:700;padding:2px 7px;border-radius:5px;color:#0b0d12}',
'.lr-chk-spl{font-size:11px;color:#6f7583;align-self:center;font-weight:600;margin-right:2px}',
'.lr-chk-lg{font-size:10px;color:#5d6373;margin-top:6px;line-height:1.4}',
'.lr-chk-cap{color:#b98a4a}',
'.lr-chk-parts{display:grid;grid-template-columns:1fr 1fr;gap:5px 14px;margin-top:10px}',
'.lr-chk-pt{display:flex;align-items:center;gap:6px;font-size:9.5px;color:#8a90a0;line-height:1}',
'.lr-chk-pl{width:66px;flex:0 0 66px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}',
'.lr-chk-pb{flex:1;height:4px;border-radius:2px;background:#222834;overflow:hidden}',
'.lr-chk-pb i{display:block;height:100%;background:#ff8c33;border-radius:2px}',
'.lr-chk-pv{width:32px;flex:0 0 32px;text-align:right;font-variant-numeric:tabular-nums;color:#6f7583}',
'.lr-chk-sp .lr-gl-e,.lr-chk-sp .lr-gl-f{color:#fff}',
'.lr-ck{margin-left:auto;flex:0 0 auto;font-size:9.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#ffb07d!important;background:rgba(255,107,26,.13);border:1px solid rgba(255,107,26,.4);border-radius:6px;padding:2px 6px;cursor:pointer;text-decoration:none!important;white-space:nowrap;line-height:1.6}',
'.lr-ck:hover,.lr-ck:focus{background:#FF6B1A;color:#111!important;border-color:#FF6B1A}',
'.lr-hb{font-size:9px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#5ce6b0!important;background:rgba(92,230,176,.12);border:1px solid rgba(92,230,176,.4);border-radius:6px;padding:2px 6px;white-space:nowrap;line-height:1.6;margin-left:4px}',
'.lr-hbt{display:flex;align-items:center;gap:8px;margin:0 0 10px;flex-wrap:wrap}',
'.lr-hbt button{background:none;border:1px solid #3a3f4d;color:#9aa3b5;font:inherit;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:5px 10px;border-radius:999px;cursor:pointer}',
'.lr-hbt button.on{background:rgba(92,230,176,.14);border-color:rgba(92,230,176,.55);color:#5ce6b0}',
'.lr-hbt span{font-size:11px;color:#6b7280}',
'.lr-hboff{color:#ff8a3d;cursor:pointer;text-decoration:underline}',
'.lr-hboff:hover{color:#fff}',
'.lr-chk-try{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-top:9px}',
'.lr-chk-tryl{font-size:10.5px;color:#6f7583}',
'.lr-chk-tryb{display:inline-flex;align-items:center;gap:5px;font:inherit;font-size:11px;font-weight:600;color:#cfd3dd;background:#0b0d12;border:1px solid #2c3140;border-radius:7px;padding:4px 8px;cursor:pointer}',
'.lr-chk-tryb:hover{border-color:#FF6B1A;color:#fff}',
'.lr-chk-tryb i{font-style:normal;font-size:9.5px;font-weight:800;color:#0b0d12;border-radius:4px;padding:1px 4px}',
'.lr-chk-trade{display:flex;margin-top:12px}',
'.lr-chk-trade a{flex:1;display:inline-flex;align-items:center;justify-content:center;background:#FF6B1A;color:#111!important;font-size:12.5px;font-weight:800;border-radius:9px;padding:10px 14px;text-decoration:none!important}',
'.lr-chk-trade a:hover{background:#ff8135}',
'.lr-chk-disc{font-size:9.5px;color:#5d6373;margin-top:5px;line-height:1.4}',
'.lr-chk-sh{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px}',
'.lr-chk-sh a,.lr-chk-cp{font:inherit;font-size:11px;font-weight:600;color:#cfd3dd;background:#1b1f2a;border:1px solid #2c3140;border-radius:7px;padding:5px 9px;text-decoration:none!important;cursor:pointer}',
'.lr-chk-sh a:hover,.lr-chk-cp:hover{border-color:#FF6B1A;color:#fff}',
'.lr-gk{cursor:pointer}',
'.lr-picks{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin:0 0 10px}',
'.lr-picks-l{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:#7d8391;font-weight:700;margin-right:1px}',
'.lr-pickb{display:inline-flex;align-items:center;gap:6px;background:#12141c;border:1px solid #262a36;border-radius:9px;padding:6px 9px;cursor:pointer;font:inherit;font-size:12px;color:#e8eaf0}',
'.lr-pickb:hover{border-color:#FF6B1A;color:#fff}',
'.lr-pickb i{font-style:normal;font-weight:800;font-size:9.5px;color:#0b0d12;border-radius:4px;padding:1px 4px}',
'.lr-pickn{font-size:10.5px;color:#7d8391;font-variant-numeric:tabular-nums}',
'.lr-pickw{border-color:rgba(227,59,46,.45);background:rgba(227,59,46,.09)}',
'.lr-pickw:hover{border-color:#e33b2e}',
'.lr-picks-hint{font-size:10px;color:#5d6373;margin-left:2px}',
'.lr-gk:hover{box-shadow:0 0 0 2px rgba(255,107,26,.55)}',
'@media(max-width:640px){'+
'.lr-chk-k{grid-template-columns:repeat(2,1fr);gap:7px}'+
'.lr-chk-parts{grid-template-columns:1fr;gap:7px}'+
'.lr-chk-pt{font-size:11px}'+
'.lr-chk-pl{width:88px;flex:0 0 88px}'+
'.lr-chk-gr{width:46px;height:46px;font-size:20px;border-radius:10px}'+
'.lr-chk-trade a{padding:12px 14px;font-size:13px}'+
'.lr-ck{padding:4px 8px;font-size:10px}'+
'.lr-chk-box{padding:14px 12px 12px}'+
'}'
].join('');
document.head.appendChild(st);
var sec=document.createElement('section');
sec.className='lr-chk';
sec.innerHTML='
'+
'
PumpCheck
'+
'Grade any coin before you buy: who holds the supply, what your exit costs, how far the curve still has to run.'+
''+
''+
''+
''+
'
Not a buy signal. A dump-risk read: an F means the supply above you is bigger than the demand under you.
'+
'
';
// Standalone widget: it mounts only on a page that provides a target.
// The homepage hero belongs to the Top 10 board now, so no target there
// means no box - the full explainer and the tool live at /pumpcheck/.
var mount=document.getElementById('pumpcheck-app');
if(!mount)return;
mount.appendChild(sec);
var box=sec.querySelector('.lr-chk-box');
var input=sec.querySelector('.lr-chk-i'),btn=sec.querySelector('.lr-chk-btn'),out=sec.querySelector('.lr-chk-o');
function e2(v){return String(v==null?'':v).replace(/[&<>"']/g,function(c){return {'&':'&','<':'<','>':'>','"':'"',"'":'''}[c];});}
function usd(n){n=Number(n||0);return '$'+n.toLocaleString(undefined,{maximumFractionDigits:0});}
// Always an estimate, always forward-looking, and it says so: "~2 h" with a
// "at today's pace" caption underneath, never a bare "2 h" that could be
// read as time since graduation.
function mins(n){
if(n==null||isNaN(n))return 'no estimate';
if(n<=0)return 'any minute';
if(n<60)return '~'+n+' min';
if(n>=1440)return 'over a day';
var h=Math.floor(n/60), m=Math.round(n%60);
if(m===0||m===60)return '~'+h+' h';
return '~'+h+' h '+m+' m';
}
// Score components, so the letter is explainable: each bar is points earned
// out of that component's ceiling. A zero bar is the reason for a bad grade.
function partsBlock(c){
var p=c.parts||{};
var rows=[
['Whale supply',p.concentration,35],
['Bundled supply',p.insider_load,20],
['Snipers',p.sniper_tail,10],
['Liquidity',p.liquidity,20],
['Buy pressure',p.order_flow,10],
['Time alive',p.age,11]
];
var h='';
for(var i=0;i'+
''+lb+''+
''+
''+v+'/'+mx+''+
'';
}
return '
'+h+'
'+
'
Each bar is points earned out of its maximum.
';
}
// Spells out the exact path from the bars to the shown number, so no step
// of the math is invisible: bars -> flag penalties -> hard cap.
function explainScore(c){
var p=c.parts||{}, sum=0, k;
for(k in p){ if(Object.prototype.hasOwnProperty.call(p,k)) sum+=Number(p[k]||0); }
sum=Math.round(sum*10)/10;
var raw=(c.raw_score==null)?sum:c.raw_score, fin=Number(c.score||0);
if(sum<=fin)return '';
var msg='Bars total '+sum;
if(raw'+msg+'.';
}
function walletPct(o){
var w=(o&&o.wallets)||0, p=(o&&o.supply_pct)||0;
if(!w)return 'none';
p=Math.round(p*10)/10;
return w+' w'+(p>=0.1?' · '+p+'%':'');
}
// One tile shape everywhere: name, number, and a caption saying what the
// number means. A label without a caption is where jargon hides.
function tile(label,value,sub,vid){
return '
'+label+''+
''+value+''+
(sub?''+sub+'':'')+'
';
}
function cls(g){return {'A':'a','B':'b','C':'c','D':'d','E':'e','F':'f'}[g]||'q';}
function watchBtn(c){
var on=wlHas(c.mint);
return '';
}
// The grader falls through to "Brand new - no curve movement yet" whenever
// no other headline rule fires, which is wrong for a coin that came off
// the curve hours ago (Hypurr: 5h old, 1,005 holders, $9.2k pool, still
// reading "Brand new"). Override it here from fields the payload already
// carries, so the panel never says something plainly false.
function headlineOf(c){
var h=c.headline||'';
if(h.indexOf('Brand new')!==0) return h;
var liq=(c.liquidity_usd||0), age=(c.age_min||0), hold=(c.holders||0);
if(c.graduated) return 'Graduated and trading on PumpSwap';
if((c.curve_pct||0)<=0.5 && liq>=5000)
return 'Off the curve - $'+liq.toLocaleString()+' sitting in the pool';
if(age>=30 && hold>=50)
return 'Flat curve, '+hold.toLocaleString()+' holders - going nowhere yet';
return h;
}
function render(c){
var sl=c.slippage||{};
out.innerHTML='
'+
tile('Bag above you', usd(c.bag_above_usd), 'held by the top 10 wallets')+
tile('Price impact, selling $500', (sl.usd500==null?'n/a':sl.usd500+'%'),
(sl.usd500==null?'no pool to measure':('≈ '+usd(Math.round(500*sl.usd500/100))+' below the current price, from your order alone')))+
(c.graduated
? tile('Status', 'Graduated', 'now trading on PumpSwap')+
tile('Pool liquidity', (c.liquidity_usd?usd(c.liquidity_usd):'n/a'), 'the money backing sells')
: tile('Bonding curve', (c.curve_pct!=null?c.curve_pct+'%':'n/a'), 'of the curve sold, 100% graduates')+
tile('Graduates in', mins(c.eta_minutes), 'estimate at its average pace since launch','lr-eta'))+
tile('Top 10 hold', c.top10_pct+'%', 'of all supply')+
tile('Snipers', walletPct(c.snipers), 'bought in the first seconds')+
tile('Bundlers', walletPct(c.bundlers), 'wallets that bought as one block')+
tile('Insiders', walletPct(c.insiders), 'wallets tied to the team')+
tile('Holders', (c.holders||0), 'wallets holding any amount')+
tile('Dev holds', (c.dev_pct||0)+'%', 'creator\u2019s remaining bag')+
tile('Buys / sells', (c.buys||0)+' / '+(c.sells||0), 'trade count since launch')+
'
Links to PumpFun carry our referral code. It costs you nothing and pays for the radar.
'+
''+
shareRow(c)+
helpBlock(c)+
'
Data: SolanaTracker \u00b7 regraded on every load \u00b7 not financial advice
'+
(armLive(c),paintDrift(),'');
out.dataset.mint=c.mint||'';
loadBuyers(c.mint);
}
function currentMint(){ return (out&&out.dataset)?(out.dataset.mint||''):''; }
// Drift: "was C 58 six hours ago, now B 67". Nobody else can show this
// because it is built from our own snapshots, not the upstream API.
function paintDrift(){
var el=document.getElementById('lr-drift');
if(!el)return;
var mint=el.getAttribute('data-mint')||'';
var rec=window.LR_GRADE_RECORD||{};
var d=(rec.drift||{})[mint];
if(!d||!d.from_grade){ el.hidden=true; return; }
if(d.from_grade===d.to_grade&&Math.abs((d.to_score||0)-(d.from_score||0))<1){ el.hidden=true; return; }
var hrs=d.hours>=1?Math.round(d.hours)+' h':Math.round(d.hours*60)+' min';
var up=rank(d.to_grade)d.from_score);
el.className='lr-chk-drift '+(up?'lr-chk-drift-up':'lr-chk-drift-dn');
el.innerHTML=(up?'▲ Improving':'▼ Deteriorating')+' · was '+e2(d.from_grade)+' '+
e2(String(d.from_score))+' '+hrs+' ago, now '+e2(d.to_grade)+' '+e2(String(d.to_score));
el.hidden=false;
}
function rank(g){var i='ABCDEF'.indexOf(g);return i<0?9:i;}
document.addEventListener('click',function(ev){
var b=ev.target;
if(!b||!b.classList)return;
if(b.classList.contains('lr-chk-sum')){
var txt=b.getAttribute('data-txt')||'';
var done=function(){b.textContent='Copied';setTimeout(function(){b.textContent='Copy for chat';},1600);};
try{
if(navigator.clipboard&&navigator.clipboard.writeText){
navigator.clipboard.writeText(txt).then(done,function(){window.prompt('Copy this',txt);});
}else{window.prompt('Copy this',txt);}
}catch(e){window.prompt('Copy this',txt);}
}
});
// Watchlist: free, local, no account. It is the reason to come back to the
// page instead of forgetting the coin - alerts stay the paid product.
var WL_KEY='lr_watch_v1';
function wlRead(){
try{ var a=JSON.parse(localStorage.getItem(WL_KEY)||'[]'); return Array.isArray(a)?a:[]; }
catch(e){ return []; }
}
function wlWrite(a){
try{ localStorage.setItem(WL_KEY,JSON.stringify(a.slice(0,20))); }catch(e){}
}
function wlMint(m){ return (m||'').trim(); }
function wlToggle(c){
if(!c||!c.mint)return;
var a=wlRead(), m=wlMint(c.mint), found=-1;
for(var i=0;i-1) a.splice(found,1);
else a.unshift({mint:m,sym:c.symbol||c.name||'coin',grade:c.grade||'',score:c.score||0,ts:Date.now()});
wlWrite(a); wlPaint();
}
function wlHas(m){
var a=wlRead(); m=wlMint(m);
for(var i=0;i'+
e2((w.sym||'coin').slice(0,10))+
(w.grade?' '+e2(w.grade)+'':'')+
'';
}
h+='';
host.hidden=false; host.innerHTML=h;
}
document.addEventListener('click',function(ev){
var b=ev.target;
if(!b||!b.classList)return;
if(b.classList.contains('lr-wl-c')){
var mt=b.getAttribute('data-mint');
if(mt&&window.LR_CHECK)window.LR_CHECK(mt,true);
return;
}
if(b.id==='lr-wl-clear'){ wlWrite([]); wlPaint(); return; }
if(b.id==='lr-watch'&&b.getAttribute('data-mint')){
var cur=(b.getAttribute('data-on')==='1');
var c={mint:b.getAttribute('data-mint'),symbol:b.getAttribute('data-sym'),grade:b.getAttribute('data-grade'),score:parseFloat(b.getAttribute('data-score')||'0')};
if(cur){
var a=wlRead(), out=[];
for(var i=0;iscore)better++;
return 'Board right now: median '+(Math.round(med*10)/10)+' · this coin ranks '+(better+1)+' of '+ss.length;
}
function armLive(c){
var same=(LIVE.mint&&LIVE.mint===c.mint&&!!LIVE.timer);
LIVE.mint=c.mint||'';
LIVE.at=Date.now();
LIVE.eta=(typeof c.eta_minutes==='number')?c.eta_minutes:null;
LIVE.grad=!!c.graduated;
if(!same){
LIVE.n=0;
LIVE.prev={grade:c.grade,score:c.score};
if(LIVE.clock)clearInterval(LIVE.clock);
if(LIVE.timer)clearInterval(LIVE.timer);
if(LIVE.mint){
LIVE.clock=setInterval(tickLive,15000);
LIVE.timer=setInterval(function(){
if(document.hidden)return;
if(LIVE.n>=5){clearInterval(LIVE.timer);LIVE.timer=null;tickLive();return;}
LIVE.n++;refreshLive();
},200000);
}
}
tickLive();
}
function tickLive(){
var f=document.getElementById('lr-fresh');
if(f)f.textContent='read '+agoText(Date.now()-LIVE.at)+(LIVE.timer?' \u00b7 refreshes on its own':'');
var e=document.getElementById('lr-eta');
if(e&&!LIVE.grad&&LIVE.eta!=null){
var left=LIVE.eta-(Date.now()-LIVE.at)/60000;
e.textContent=mins(left>0?left:0);
}
}
function refreshLive(){
if(!LIVE.mint)return;
fetch(API+'?view=check&mint='+encodeURIComponent(LIVE.mint)+'&_='+Date.now(),{cache:'no-store'})
.then(function(r){return r.json();})
.then(function(j){
if(!j||!j.ok||!j.check)return;
var c=j.check, was=(LIVE.prev||{}).grade;
render(c);
LIVE.prev={grade:c.grade,score:c.score};
if(was&&c.grade&&was!==c.grade){
var b=document.getElementById('lr-live');
if(b){
b.style.display='block';
b.innerHTML='Moved from '+e2(was)+' to '+e2(c.grade)+' since you opened this. '+
e2(c.headline||'');
}
}
}).catch(function(){});
}
// Newsletter box is the on-site list builder; nudge instead of leaving.
document.addEventListener('click',function(ev){
var b=ev.target;
if(!b||b.id!=='lr-mail')return;
var host=document.querySelector('.fluentform')||document.querySelector('form');
if(!host){
var hs=document.querySelectorAll('h2,h3,h4');
for(var i=0;i'+
'
Early buyers
'+
'
reading the trade tape…
'+
'';
}
function paintBuyers(b){
var v=document.getElementById('lr-byv'), n=document.getElementById('lr-byn');
if(!v||!n) return;
if(!b||!b.ok){ v.className='lr-chk-byv'; v.textContent='buyer detail unavailable right now'; n.innerHTML=''; return; }
if(b.thin){
v.className='lr-chk-byv '+(b.tone||'c');
v.textContent=b.verdict||'not enough trades yet';
n.innerHTML='
'+b.window+'TRADES SEEN
';
return;
}
v.className='lr-chk-byv '+(b.tone||'c');
v.textContent=b.verdict;
var cells=[
[''+b.buyers+'WALLETS BOUGHT'],
[''+b.repeat+'BOUGHT 3+ TIMES'],
[''+b.repeat_share+'%OF BUYS FROM THEM'],
[''+(b.burst)+'MOST NEW WALLETS IN 1 MIN']
];
if(b.bot_pct!=null) cells.push([''+b.bot_pct+'%FROM TRADING BOTS']);
n.innerHTML=cells.map(function(x){return '
'+x[0]+'
';}).join('');
}
function loadBuyers(mint){
if(!mint) return;
fetch(BUYERS+'?mint='+encodeURIComponent(mint))
.then(function(r){return r.json();})
.then(function(b){ if(mint===currentMint()) paintBuyers(b); })
.catch(function(){ paintBuyers(null); });
}
function helpBlock(c){
return 'How to read this grade'+
'
'+
'
A cleanest book, rare on this board · B structurally sound · '+
'C average coin, average odds · D thin, size down · '+
'E heavy bag above you · F exit liquidity.
'+
'
The score is built from six parts (supply concentration, bundled supply, sniper tail, '+
'liquidity, buy pressure, time alive) and then capped when the holder book is stacked or '+
'the pool is too thin to sell into, so a coin cannot grade well while a few wallets own '+
'most of it or there is nobody on the other side of your exit.
'+
'
Bag above you is the dollar value the top 10 wallets would need buyers to absorb. '+
'Price impact is how far your own sell moves the price. '+
'Bundlers are wallets that bought at creation as one block, usually one owner.
'+
'
None of this predicts price. It measures who is positioned to sell into you.
'+
'
';
}
// Every result is shareable. The link opens with the same grade already on
// screen, so a post to X brings people in to a finished answer, not a form.
function shareRow(c){
var dl=location.origin+location.pathname+'?check='+encodeURIComponent(c.mint||'');
var txt=(c.symbol||c.name||'This coin')+' grades '+c.grade+' ('+c.score+'/100) on PumpCheck'+
(c.headline?' - '+c.headline:'');
// Plain-text summary shaped for a Telegram or Discord group: symbol,
// grade, the two numbers that matter, then the link. Traders paste
// reads into group chats far more than they post them on X.
var sum=(c.symbol||c.name||'coin').toUpperCase()+' - PumpCheck '+c.grade+' '+
(c.score)+'/100'+(c.grade==='?'?'':' ('+(c.verdict||'')+')')+'\n'+
(c.headline?c.headline+'\n':'')+
'Bag above you: '+usd(c.bag_above_usd)+' held by top 10\n'+
'Exit $500: '+(c.slippage&&c.slippage.usd500!=null?c.slippage.usd500+'%':'-')+
(c.graduated?'':' | Curve '+Math.round(c.curve_pct)+'%')+'\n'+dl;
return '
';
}
document.addEventListener('click',function(ev){
var b=ev.target;
if(!b||!b.classList||!b.classList.contains('lr-chk-cp'))return;
var link=b.getAttribute('data-link')||'';
var done=function(){b.textContent='Copied';setTimeout(function(){b.textContent='Copy link';},1600);};
try{
if(navigator.clipboard&&navigator.clipboard.writeText){
navigator.clipboard.writeText(link).then(done,function(){window.prompt('Copy this link',link);});
}else{window.prompt('Copy this link',link);}
}catch(e){window.prompt('Copy this link',link);}
});
// Entry point for the board's Check pills and for ?check= deep links.
function doCheck(mint,scroll){
if(!mint)return;
input.value=mint;
run();
try{
if(scroll&&sec.scrollIntoView)sec.scrollIntoView({behavior:'smooth',block:'center'});
box.style.transition='box-shadow .35s';
box.style.boxShadow='0 0 0 2px rgba(255,107,26,.5)';
setTimeout(function(){box.style.boxShadow='';},1400);
}catch(e){}
}
window.LR_CHECK=doCheck;
wlPaint();
// Instant demo: grade one of the coins currently on the board.
function fillTry(list){
var host=document.getElementById('lr-chk-try');
if(!host||!list||!list.length||host.getAttribute('data-done'))return;
var h='Try one from the board:', n=0;
for(var i=0;i'+
e2(c.symbol||c.name||'coin')+
(c.grade&&c.grade!=='?'?' '+e2(c.grade)+'':'')+
'';
}
if(!n)return;
host.setAttribute('data-done','1');
host.innerHTML=h;
host.addEventListener('click',function(ev){
var t=ev.target;
while(t&&t!==host){
if(t.classList&&t.classList.contains('lr-chk-tryb')){
if(t.getAttribute('data-mint'))doCheck(t.getAttribute('data-mint'),true);
return;
}
t=t.parentNode;
}
});
}
window.LR_TRY=fillTry;
try{
if(window.__lrTryPending)fillTry(window.__lrTryPending);
setTimeout(function(){if(window.__lrTryPending)fillTry(window.__lrTryPending);},1800);
var qm=(location.search.match(/[?&]check=([1-9A-HJ-NP-Za-km-z]{32,44})/)||[])[1];
if(qm)setTimeout(function(){doCheck(qm,true);},500);
}catch(e){}
function run(){
var raw=(input.value||'').trim();
var m=raw.match(/[1-9A-HJ-NP-Za-km-z]{32,44}/);
if(!m){out.innerHTML='
That does not look like a coin address. Paste a Solana address or a pump.fun link, or tap a coin on the board above.
Could not read that coin. Check the address, or try again in a minute.
'+
'';
var r=out.querySelector('.lr-chk-retry');
if(r)r.addEventListener('click',function(){run();});
})
.then(function(){btn.disabled=false;btn.textContent='Check';});
}
sec.querySelector('form').addEventListener('submit',function(ev){ev.preventDefault();run();});
// Grade record: only rendered once enough graded coins have resolved.
function showRecord(){
try{
var rec=window.LR_GRADE_RECORD;
if(!rec||!box)return;
// grade spread: shows the letters are actually spread out, not all F
if(rec.dist_total>=15){
var sp=document.createElement('div');
sp.className='lr-chk-sp';
var sh='Graded, last 24h';
for(var gi=0;gi<6;gi++){
var g='ABCDEF'.charAt(gi), n=(rec.dist||{})[g]||0;
if(!n)continue;
sh+=''+g+' '+n+'';
}
if(sh){
sp.innerHTML=sh;
box.appendChild(sp);
var lg=document.createElement('div');
lg.className='lr-chk-lg';
lg.innerHTML='A cleanest · F worst · a read on dump risk, not a buy signal';
box.appendChild(lg);
}
}
if(!rec.publishable){
// Honest progress instead of silence: says what the record is doing
// and when it will appear, rather than showing nothing at all.
if(rec.tracked_total){
var pr=document.createElement('div');
pr.className='lr-chk-lg';
pr.innerHTML=rec.tracked_total+' coins graded so far · the win-rate record goes public at 40 resolved';
box.appendChild(pr);
}
return;
}
var st=rec.strong||{},wk=rec.weak||{};
if(st.rate==null||wk.rate==null||!st.n||!wk.n)return;
var line=document.createElement('div');
line.className='lr-chk-rec';
line.innerHTML='Grade record: A/B graded coins graduated '+st.rate+'% ('+st.won+'/'+st.n+
') vs '+wk.rate+'% for D/F ('+wk.won+'/'+wk.n+') within '+rec.window_h+' hours.';
box.appendChild(line);
}catch(e){}
}
try{
var recs=document.createElement('script');
recs.src='https://firememecoins.com/wp-content/uploads/2026/10/grade-record.txt?v='+Date.now();
recs.onload=function(){ try{showRecord();}catch(e){} try{paintDrift();}catch(e){} };
recs.onerror=function(){};
document.head.appendChild(recs);
}catch(e){}
}catch(e){}
})();