[object Object]

← back to Rentv

chore(services): localhost-only ?reset=outreach to clear the outreach basket

e8a2e401a559270316372ddac62902dd771eace7 · 2026-08-06 15:08:25 -0700 · Steve

Dev/preview convenience — clears the rentv.growthLI.v1 localStorage bucket, but only
when hostname is 127.0.0.1/localhost, so a shared or bookmarked link can never wipe a
real outreach list on the live site. No-op on the production domain.

Files touched

Diff

commit e8a2e401a559270316372ddac62902dd771eace7
Author: Steve <steve@designerwallcoverings.com>
Date:   Thu Aug 6 15:08:25 2026 -0700

    chore(services): localhost-only ?reset=outreach to clear the outreach basket
    
    Dev/preview convenience — clears the rentv.growthLI.v1 localStorage bucket, but only
    when hostname is 127.0.0.1/localhost, so a shared or bookmarked link can never wipe a
    real outreach list on the live site. No-op on the production domain.
---
 public/services.html | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/public/services.html b/public/services.html
index 3e105304..8b020ccf 100644
--- a/public/services.html
+++ b/public/services.html
@@ -225,6 +225,9 @@ const GKEY='rentv.'+'growthLI.v1';   // shared localStorage bucket social.html r
 const SOCIAL_CAT={construction:'Construction / GCs',lenders:'Lenders & Capital Sources',escrow:'Escrow',developers:'Developers',legal:'Legal',title:'Title',property:'Vendors / Service Providers'};
 function gload(){ try{ return JSON.parse(localStorage.getItem(GKEY))||[]; }catch(e){ return []; } }
 function gsave(l){ localStorage.setItem(GKEY,JSON.stringify(l)); }
+// LOCALHOST-ONLY reset: ?reset=outreach clears the outreach basket. Host-gated so a shared/bookmarked
+// link can never wipe a real outreach list on the live site — it only works on the local preview.
+if(new URLSearchParams(location.search).get('reset')==='outreach' && /^(127\.0\.0\.1|localhost)$/.test(location.hostname)){ try{ localStorage.removeItem(GKEY); }catch(e){} }
 function outreachRefresh(){ const n=gload().filter(x=>x&&x.kind==='contact').length; $('ocount').textContent=n; $('obasket').classList.toggle('show',ADMIN); $('solall').style.display=ADMIN?'inline-flex':'none'; }
 function inOutreach(name,scat){ return gload().some(x=>x&&x.kind==='contact'&&x.cat===scat&&(x.name||'').toLowerCase()===String(name).toLowerCase()); }
 function scatOf(){ return SOCIAL_CAT[cat]||'Vendors / Service Providers'; }

← 44ff063a auto-data-snapshot: 2026-08-06T15:00:51 (7 data files) — dat  ·  back to Rentv  ·  feat(deals): parseAcquirer() extracts the leading firm from 9aa5412f →