[object Object]

← back to Linkedin Like Helper

chore: refactor (loadKey helper, named TAB_STAGGER_MS), lint clean (session close)

56aaf4f96cfee46096128202ef28481c0c6f621a · 2026-06-30 12:04:11 -0700 · Steve

Files touched

Diff

commit 56aaf4f96cfee46096128202ef28481c0c6f621a
Author: Steve <steve@designerwallcoverings.com>
Date:   Tue Jun 30 12:04:11 2026 -0700

    chore: refactor (loadKey helper, named TAB_STAGGER_MS), lint clean (session close)
---
 index.html | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/index.html b/index.html
index f4f471c..9f8112f 100644
--- a/index.html
+++ b/index.html
@@ -191,9 +191,11 @@
 
 <script>
 /* ---------- shared ---------- */
+const TAB_STAGGER_MS = 150;
 function openTabs(urls){
-  urls.forEach((u,i)=> setTimeout(()=>window.open(u,'_blank','noopener'), i*150));
+  urls.forEach((u,i)=> setTimeout(()=>window.open(u,'_blank','noopener'), i*TAB_STAGGER_MS));
 }
+function loadKey(k){ try{ return JSON.parse(localStorage.getItem(k))||{} }catch(e){ return {} } }
 function syncCustom(which){
   const sel = document.getElementById(which==='f'?'fsize':'size').value;
   document.getElementById(which==='f'?'fcustomWrap':'lcustomWrap').style.display = sel==='custom' ? '' : 'none';
@@ -233,9 +235,7 @@ const PRESETS = [
 ];
 let fOpened = new Set();   // urls opened this session
 
-function loadFeedPrefs(){
-  try{ return JSON.parse(localStorage.getItem('lk_feed_prefs'))||{} }catch(e){ return {} }
-}
+function loadFeedPrefs(){ return loadKey('lk_feed_prefs'); }
 function persistFeeds(){
   const checked = {};
   document.querySelectorAll('#sources input[type=checkbox]').forEach(c=>checked[c.value]=c.checked);
@@ -296,7 +296,7 @@ function resetFeeds(){ fOpened.clear(); renderFeedStats(); }
 /* ======================================================== */
 const KEY='lk_like_helper_v1';
 let items=[];
-function loadLS(){ try{ return JSON.parse(localStorage.getItem(KEY))||{} }catch(e){ return {} } }
+function loadLS(){ return loadKey(KEY); }
 function saveLS(s){ localStorage.setItem(KEY, JSON.stringify(s)); }
 function loadList(){
   const lines = document.getElementById('urls').value.split(/\n+/).map(s=>s.trim()).filter(Boolean);

← d974f37 add Feed-pages mode: batch-open curated LinkedIn streams (ho  ·  back to Linkedin Like Helper  ·  feed mode: persist Opened set to localStorage so progress su d7cf6b0 →