(function(){ if (window.__LM_ONCE__) return; window.__LM_ONCE__ = true; /* Rename the Home CTA + wire link to #writingroom; shorten Writing Room CTAs to "Start" */ function renameCTA(){ var nodes = Array.from(document.querySelectorAll('a, button')); nodes.forEach(function(n){ var text = (n.textContent || '').trim().toLowerCase(); // Home page primary CTA → "Start Your Story" + link to #writingroom if (n.closest('#home')) { if (text.includes('start')) { n.textContent = 'Start Your Story'; n.setAttribute('href', '#writingroom'); } } // Writing Room chapter CTAs → just "Start" if (n.closest('#writingroom')) { if (text.includes('start your story') || text.includes('begin') || text.includes('go') || text === 'start chapter 1' || text === 'start chapter') { n.textContent = 'Start'; } // ensure the button gets the consistent style n.classList.add('wr-btn'); } }); } /* Move “Chapter 1 — Where It All Began” into the Back/Next row (footer) */ function relocateChapterTitle(){ var s = document.querySelector('#ch1q2a'); if (!s) return; var h1 = s.querySelector('h1'); // "Chapter 1" var h2 = s.querySelector('h2'); // "Where It All Began" var title = (h1 ? h1.textContent.trim() : '') || ''; var sub = (h2 ? h2.textContent.trim() : '') || ''; if (!title && !sub) return; // Try to find the actual Back/Next row that holds both buttons var prev = document.getElementById('prevBtn'); var next = document.getElementById('nextBtn'); if (!prev || !next) return; // Climb to their shared container var row = prev; for (var i=0; i<6 && row; i++){ if (row.contains(next) && row.nodeType===1 && row.tagName!=='BUTTON') break; row = row.parentElement; } if (!row || !row.contains(next)) return; row.classList.add('lm-actions'); if (!row.querySelector('.lm-footer-title')) { var span = document.createElement('span'); span.className = 'lm-footer-title'; span.textContent = sub ? (title + ' — ' + sub) : title; row.appendChild(span); } // Hide the top headings so they don’t duplicate if (h1) h1.style.display = 'none'; if (h2) h2.style.display = 'none'; } /* DOM ready helper */ function ready(fn){ if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', fn, { once:true }); } else { fn(); } } ready(function(){ renameCTA(); relocateChapterTitle(); }); // Re-run after potential Carrd defers / anchor navigation window.addEventListener('load', function(){ setTimeout(function(){ renameCTA(); relocateChapterTitle(); }, 50); setTimeout(function(){ renameCTA(); relocateChapterTitle(); }, 400); }); })();
LifeMine Stories
Your life story — one chapter at a time.
How it works
◆Capture your life story in 7 chapters, each dedicated to a different era of your life.
◆Answer a set of questions designed specifically for each chapter.
◆Your responses will generate a "rough draft" in story form.
◆Review and edit the draft to fine tune your story.
◆Save your changes then lock and finalize the finished version.
◆Complete all 7 chapters for your full story, available in 3 formats:
—An online version for easy viewing and sharing (included)
—A printable PDF (included)
—An MP3 audiobook professionally narrated by AI (additional purchase)
If you still see the preview, refresh once—unlock can take a few seconds.
(function(){ if (window.__LM_FINAL_READONLY_SCRUB__) return; window.__LM_FINAL_READONLY_SCRUB__ = true; // 1) Hide any “owner link” UI if it exists in the DOM (old widgets/buttons) function nukeOwnerUI(){ const sel = [ '#lmOwnerLink', // hypothetical id '.lm-owner-link', // hypothetical class '[data-owner-link]', // data attr '#btnOwner', // any stray button '.get-owner-link', // legacy label '.owner-chip' // any chip/badge ].join(','); document.querySelectorAll(sel).forEach(el => { try{ el.remove(); }catch(_){} }); } // 2) Strip ?k= from the current URL (don’t leak keys in address bar or shares) (function stripKParam(){ try{ const url = new URL(location.href); if (url.searchParams.has('k')) { url.searchParams.delete('k'); history.replaceState({}, '', url.toString()); } }catch(_){} })(); // 3) Wrap Share so we never include ?k= even if something re-adds it (function guardShare(){ const btnShare = document.getElementById('btnShare'); if (!btnShare) return; btnShare.onclick = async function(e){ e.preventDefault(); try{ const base = new URL(location.href); const clean = new URL(base.origin + base.pathname); // Preserve uuid only const qs = new URLSearchParams(location.search || ''); const uuid = (qs.get('uuid') || '').trim(); if (uuid) clean.searchParams.set('uuid', uuid); clean.hash = '#ch1-story'; const sharable = clean.toString(); const data = { title: document.title || 'LifeMine Chapter', text: 'Read my chapter', url: sharable }; if (navigator.share){ try { await navigator.share(data); return; } catch(_){} } await navigator.clipboard.writeText(sharable); alert('Link copied to clipboard.'); }catch(_){ prompt('Copy this link:', location.origin + location.pathname + location.search + '#ch1-story'); } }; })(); // 4) Force final copies to hide Edit/Lock (in case CSS is overridden elsewhere) function enforceFinalButtons(){ if (!document.body.classList.contains('lm-final')) return; ['btnEdit','btnLock'].forEach(id=>{ const el = document.getElementById(id); if (el){ el.style.display = 'none'; el.setAttribute('aria-hidden','true'); } }); } // 5) Neutralize any legacy “owner gate” toggles that might re-add edit function neutralizeLegacyGate(){ // remove accidental lm-owner class so nothing re-enables Edit in final document.body.classList.remove('lm-owner'); // noop any globals some old embeds might have installed ['LM_owner','LM_makeOwnerLink'].forEach(k=>{ try{ if (typeof window[k] !== 'undefined') window[k] = {}; }catch(_){} }); } function run(){ nukeOwnerUI(); neutralizeLegacyGate(); enforceFinalButtons(); } // Run now and after DOM changes for a short window (to catch late inserts) run(); const mo = new MutationObserver(()=>run()); mo.observe(document.documentElement, {childList:true, subtree:true}); setTimeout(()=>{ try{ mo.disconnect(); }catch(_){ } }, 8000); })();