What Do You Want? I Want My Own _____ .
want to stay connected? get in HERE
What the people want:
Loading what the people want...
(async function () { /* ===================================== SUPABASE CONFIGURATION ===================================== */ const SUPABASE_URL = 'https://dvgrawagdqbucdezdmsa.supabase.co'; const API_KEY = 'sb_publishable_485DEPFQhcbPuRSSczN9TQ_1HGDCpYn'; const SUBMISSIONS_URL = SUPABASE_URL + '/rest/v1/Submissions?select=id,answer&approved=eq.true&order=created_at.desc'; const COUNTS_URL = SUPABASE_URL + '/rest/v1/rpc/get_heart_counts'; const VOTE_URL = SUPABASE_URL + '/rest/v1/rpc/toggle_vote'; const container = document.getElementById('iwmo-wants'); if (!container) return; const headers = { 'apikey': API_KEY, 'Authorization': 'Bearer ' + API_KEY }; /* ===================================== ANONYMOUS VOTER ===================================== */ let voterId = localStorage.getItem('iwmo_voter_id'); if (!voterId) { voterId = crypto.randomUUID(); localStorage.setItem('iwmo_voter_id', voterId); } /* ===================================== SAVED HEART STATES ===================================== */ let savedVotes = {}; try { savedVotes = JSON.parse( localStorage.getItem('iwmo_votes') ) || {}; } catch { savedVotes = {}; } function saveVotes() { localStorage.setItem( 'iwmo_votes', JSON.stringify(savedVotes) ); } /* ===================================== HEART COUNTS ===================================== */ let heartCounts = {}; let countsAvailable = false; async function fetchHeartCounts() { const response = await fetch(COUNTS_URL, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: '{}', cache: 'no-store' }); if (!response.ok) { throw new Error( 'Heart counts failed: ' + response.status + ' ' + await response.text() ); } const rows = await response.json(); if (!Array.isArray(rows)) { throw new Error( 'Unexpected heart count response' ); } const nextCounts = {}; rows.forEach(row => { const count = Number(row.heart_count); if ( Number.isSafeInteger(count) && count >= 0 ) { nextCounts[row.submission_id] = count; } }); heartCounts = nextCounts; countsAvailable = true; updateDisplayedCounts(); } function updateDisplayedCounts() { container.querySelectorAll( '.iwmo-heart-count' ).forEach(element => { const id = element.dataset.submissionId; element.textContent = countsAvailable ? String(heartCounts[id] ?? 0) : '—'; }); const errorMessage = container.querySelector('.iwmo-count-error'); if (errorMessage) { errorMessage.style.display = countsAvailable ? 'none' : 'block'; } } /* ===================================== LIKE OR UNLIKE A WANT ===================================== */ async function toggleVote(submissionId, heartButton) { if (heartButton.disabled) return; heartButton.disabled = true; try { const response = await fetch(VOTE_URL, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify({ p_submission_id: submissionId, p_voter_id: voterId, p_vote: 1 }) }); if (!response.ok) { throw new Error( 'Like failed: ' + await response.text() ); } /* UPDATE HEART STATE */ if (savedVotes[submissionId] === 1) { delete savedVotes[submissionId]; } else { savedVotes[submissionId] = 1; } saveVotes(); const liked = savedVotes[submissionId] === 1; heartButton.classList.toggle( 'active', liked ); heartButton.textContent = liked ? '♥' : '♡'; heartButton.setAttribute( 'aria-pressed', String(liked) ); /* REFRESH ACTUAL COUNTS */ try { await fetchHeartCounts(); } catch (countError) { console.error( 'Heart count refresh failed:', countError ); countsAvailable = false; updateDisplayedCounts(); } } catch (error) { console.error('Like failed:', error); } finally { heartButton.disabled = false; } } /* ===================================== LOAD APPROVED SUBMISSIONS ===================================== */ try { const response = await fetch( SUBMISSIONS_URL, { headers } ); if (!response.ok) { throw new Error( 'Could not load submissions' ); } const submissions = await response.json(); /* LOAD COUNTS INDEPENDENTLY */ try { await fetchHeartCounts(); } catch (countError) { countsAvailable = false; console.error( 'Could not load heart counts:', countError ); } container.innerHTML = ''; if (submissions.length === 0) { container.innerHTML = '' + 'Nothing here yet.' + '
'; return; } /* ===================================== RENDER EACH WANT ===================================== */ submissions.forEach(item => { const entry = document.createElement('div'); entry.className = 'iwmo-want'; let answer = String(item.answer || '').trim(); /* REMOVE DUPLICATED PREFIX */ answer = answer.replace( /^i\s+want\s+my\s+own\s*/i, '' ); const prefix = document.createElement('div'); prefix.className = 'iwmo-prefix'; prefix.textContent = 'I Want My Own'; const answerText = document.createElement('div'); answerText.className = 'iwmo-answer'; answerText.textContent = answer; /* ===================================== HEART CONTROL ===================================== */ const votes = document.createElement('div'); votes.className = 'iwmo-votes'; const heartButton = document.createElement('button'); heartButton.className = 'iwmo-vote'; heartButton.type = 'button'; heartButton.setAttribute( 'aria-label', 'Like this want' ); const liked = savedVotes[item.id] === 1; heartButton.classList.toggle( 'active', liked ); heartButton.textContent = liked ? '♥' : '♡'; heartButton.setAttribute( 'aria-pressed', String(liked) ); heartButton.addEventListener( 'click', function () { toggleVote(item.id, heartButton); } ); /* ===================================== HEART COUNT ===================================== */ const count = document.createElement('span'); count.className = 'iwmo-heart-count'; count.dataset.submissionId = String(item.id); count.textContent = countsAvailable ? String(heartCounts[item.id] ?? 0) : '—'; count.setAttribute( 'aria-label', 'Number of likes' ); /* ASSEMBLE WANT */ votes.appendChild(heartButton); votes.appendChild(count); entry.appendChild(prefix); entry.appendChild(answerText); entry.appendChild(votes); container.appendChild(entry); }); /* COUNT ERROR MESSAGE */ const countError = document.createElement('div'); countError.className = 'iwmo-count-error'; countError.textContent = 'Heart counts temporarily unavailable.'; countError.style.display = countsAvailable ? 'none' : 'block'; container.appendChild(countError); } catch (error) { console.error( 'WANTS wall failed:', error ); container.innerHTML = '' + 'Could not load wants. ' + 'Please refresh and try again.' + '
'; } })(); (function () { /* ===================================== INITIALIZATION ===================================== */ function initialize() { const sticky = document.getElementById("iwmo-sticky"); const home = document.getElementById("iwmo-home"); const form = document.getElementById("iwmo-sticky-form"); const input = document.getElementById("iwmo-sticky-input"); const submit = document.getElementById("iwmo-sticky-submit"); const error = document.getElementById("iwmo-sticky-error"); const closeButton = document.getElementById("iwmo-sticky-close"); if (![ sticky, home, form, input, submit, error, closeButton ].every(Boolean)) { console.error( "IWMO sticky: Required element missing." ); return; } if (sticky.dataset.ready === "yes") return; sticky.dataset.ready = "yes"; /* ===================================== STATE ===================================== */ let pending = false; let dismissed = false; let answered = false; let ticking = false; /* ===================================== VISIBILITY CONTROL ===================================== */ function updateSticky() { const page = window.location.hash .replace("#", "") .toLowerCase(); const onShop = page === "shop"; const rect = home.getBoundingClientRect(); /* RE-ARM AFTER RETURNING TO HOMEPAGE */ if (rect.bottom >= 70) { dismissed = false; } /* HAS THIS VISITOR ALREADY ANSWERED? */ let alreadyParticipated = false; try { alreadyParticipated = sessionStorage.getItem( "iwmo_has_participated" ) === "yes"; } catch { alreadyParticipated = false; } /* DECIDE WHETHER TO SHOW THE PROMPT */ const shouldShow = !onShop && !dismissed && !answered && !alreadyParticipated && !pending && rect.bottom < 70; sticky.classList.toggle( "visible", shouldShow ); sticky.setAttribute( "aria-hidden", String(!shouldShow) ); if ( !shouldShow && sticky.contains(document.activeElement) ) { document.activeElement.blur(); } ticking = false; } /* OPTIMIZED SCROLL LISTENER */ function onScroll() { if (ticking) return; ticking = true; requestAnimationFrame(updateSticky); } /* ===================================== CLOSE BUTTON ===================================== */ closeButton.addEventListener( "click", function () { dismissed = true; sticky.classList.remove("visible"); sticky.setAttribute("aria-hidden", "true"); if (sticky.contains(document.activeElement)) { document.activeElement.blur(); } form.reset(); error.textContent = ""; error.style.display = "none"; } ); /* ===================================== SUBMIT WANT ===================================== */ form.addEventListener( "submit", async function (event) { event.preventDefault(); if (pending) return; const rawAnswer = input.value.trim(); const displayAnswer = rawAnswer .replace( /^i\s+want\s+my\s+own\b[\s:,-]*/i, "" ) .replace(/[.!?]+$/, "") .trim(); if (!displayAnswer) { error.textContent = "PLEASE ENTER YOUR WANT."; error.style.display = "block"; return; } /* VERIFY HOMEPAGE SUBMISSION HANDLER */ if ( !window.IWMOHomepage || typeof window.IWMOHomepage.submitWant !== "function" ) { error.textContent = "SOMETHING WENT WRONG. PLEASE REFRESH."; error.style.display = "block"; return; } pending = true; error.textContent = ""; error.style.display = "none"; submit.disabled = true; submit.textContent = "..."; try { /* * ONE SHARED SUBMISSION HANDLER * Saves want and displays homepage * confirmation automatically. */ await window.IWMOHomepage.submitWant( rawAnswer ); /* HIDE PROMPT AFTER SUCCESS */ dismissed = true; answered = true; form.reset(); sticky.classList.remove("visible"); sticky.setAttribute("aria-hidden", "true"); if (sticky.contains(document.activeElement)) { document.activeElement.blur(); } /* SCROLL TO HOMEPAGE CONFIRMATION */ const reducedMotion = window.matchMedia( "(prefers-reduced-motion: reduce)" ).matches; window.scrollTo({ top: 0, behavior: reducedMotion ? "auto" : "smooth" }); } catch (err) { console.error( "IWMO sticky submission:", err ); error.textContent = err.message === "PLEASE ENTER YOUR WANT." ? err.message : "SOMETHING WENT WRONG. TRY AGAIN."; error.style.display = "block"; } finally { pending = false; submit.disabled = false; submit.textContent = "SUBMIT"; } } ); /* ===================================== EVENT LISTENERS ===================================== */ window.addEventListener( "scroll", onScroll, { passive: true } ); window.addEventListener( "resize", onScroll ); window.addEventListener( "hashchange", updateSticky ); updateSticky(); } /* ===================================== START WHEN PAGE IS READY ===================================== */ if (document.readyState === "loading") { document.addEventListener( "DOMContentLoaded", initialize, { once: true } ); } else { initialize(); } })(); ↑ (function () { function initialize() { const button = document.getElementById('iwmo-back-to-top'); if (!button) return; function updateVisibility() { button.classList.toggle( 'visible', window.scrollY > 400 ); } button.addEventListener('click', function () { window.scrollTo({ top: 0, behavior: window.matchMedia( '(prefers-reduced-motion: reduce)' ).matches ? 'instant' : 'smooth' }); }); window.addEventListener( 'scroll', updateVisibility, { passive: true } ); updateVisibility(); } if (document.readyState === 'loading') { document.addEventListener( 'DOMContentLoaded', initialize, { once: true } ); } else { initialize(); } })();
Maybe We're Here To Decide.
(function () { const lab = document.getElementById('iwmo-lab-view'); const image = document.querySelector('#iwmo-lab-room img'); const swipeHint = document.getElementById('iwmo-lab-swipe-hint'); let swipeStartX = null; lab?.addEventListener('touchstart', function (e) { swipeStartX = e.touches[0].clientX; }, { passive: true }); lab?.addEventListener('touchmove', function (e) { if (swipeStartX === null) return; const distance = Math.abs(e.touches[0].clientX - swipeStartX); if (distance > 25) { swipeHint?.classList.add('iwmo-hint-hidden'); } }, { passive: true }); lab?.addEventListener('touchend', function () { swipeStartX = null; }, { passive: true }); if (!lab || !image) return; function centerLab() { if (window.innerWidth <= 768) { lab.scrollLeft = (lab.scrollWidth - lab.clientWidth) * 0.43; } } function updateLab() { const isLab = window.location.hash === '#lab'; lab.style.display = isLab ? 'block' : 'none'; if (isLab) { requestAnimationFrame(centerLab); } } image.addEventListener('load', centerLab); window.addEventListener('hashchange', updateLab); window.addEventListener('resize', centerLab); updateLab(); const drawHotspot = document.getElementById('iwmo-draw-hotspot'); drawHotspot?.addEventListener('click', function () { window.location.hash = '#draw'; }); const notebookHotspot = document.getElementById('iwmo-notebook-hotspot'); notebookHotspot?.addEventListener('click', function () { document.dispatchEvent( new CustomEvent('iwmo:open-notebook') ); }); const bonsaiHotspot = document.getElementById('iwmo-bonsai-hotspot'); bonsaiHotspot?.addEventListener('click', function () { document.dispatchEvent( new CustomEvent('iwmo:open-vortex') ); }); })(); (function () { 'use strict'; var experiments = [ ['THE CURRENT WEATHER APP', 'Only tells you the weather RIGHT NOW. Only works outside.'], ['BUM WIPER 9000', "A toilet that wipes your butt for you. Never wash your hands again. Maybe gives you a little spank too."], ['THE JUDGMENT MACHINE', 'A weight-loss machine that watches you eat and judges you. May also be you mother-in-law,'], ['SELF-SERVICE RESTAURANT', 'A restaurant where you cook your own food, serve your own food, buss your own table and wash your own dishes.'], ['INVINCIBLE SOCKS', 'Socks that never get holes, no matter what.'], ['ANIMAL VISION GOGGLES', 'Glasses that let you see everyone’s favorite animal. '], ['THE SELF-TYING NECKTIE', "A necktie that ties itself, so people don't know you can't tie a tie when you wear a clip on."], ['THE SAIL CAR', 'A car with no gas or engine. Just wheels and a giant sail.'], ]; function setup() { var overlay = document.getElementById('iwmo-notebook-overlay'); var close = document.getElementById('iwmo-notebook-close'); var left = document.getElementById('iwmo-idea-left'); var right = document.getElementById('iwmo-idea-right'); var prev = document.getElementById('iwmo-prev-page'); var next = document.getElementById('iwmo-next-page'); var counter = document.getElementById('iwmo-notebook-counter'); var book = document.getElementById('iwmo-book'); if (!overlay || !close || !left || !right || !prev || !next || !counter || !book) { console.error('IWMO Notebook: Required HTML element missing'); return false; } if (overlay.dataset.iwmoEightReady === 'yes') return true; overlay.dataset.iwmoEightReady = 'yes'; document.body.appendChild(overlay); var spread = 0; var busy = false; function add(parent, cls, txt) { var node = document.createElement('div'); node.className = cls; node.textContent = txt; parent.appendChild(node); } function fill(target, data) { target.replaceChildren(); var wrap = document.createElement('div'); wrap.className = 'iwmo-idea'; add(wrap, 'iwmo-idea-text', data[0]); add(wrap, 'iwmo-idea-note', data[1]); target.appendChild(wrap); } function render() { fill(left, experiments[spread * 2]); fill(right, experiments[spread * 2 + 1]); var leftNum = document.getElementById('iwmo-page-left-num'); var rightNum = document.getElementById('iwmo-page-right-num'); if (leftNum) leftNum.textContent = String(spread * 2 + 1).padStart(2,'0'); if (rightNum) rightNum.textContent = String(spread * 2 + 2).padStart(2,'0'); counter.textContent = (spread + 1) + ' / 4'; prev.disabled = spread === 0; next.disabled = spread === 3; } function flip(step) { if (busy || spread + step < 0 || spread + step > 3) return; busy = true; var cls = step > 0 ? 'turn-next' : 'turn-prev'; book.classList.add(cls); window.setTimeout(function () { spread += step; render(); book.classList.remove(cls); busy = false; }, 900); } function closeBook() { overlay.classList.remove('open'); overlay.setAttribute('aria-hidden','true'); } function openBook() { spread = 0; render(); overlay.classList.add('open'); overlay.setAttribute('aria-hidden','false'); close.focus(); } document.addEventListener('iwmo:open-notebook',openBook); close.addEventListener('click',closeBook); prev.addEventListener('click',function () { flip(-1); }); next.addEventListener('click',function () { flip(1); }); overlay.addEventListener('click',function (ev) { if (ev.target === overlay) closeBook(); }); document.addEventListener('keydown',function (ev) { if (!overlay.classList.contains('open')) return; if (ev.key === 'Escape') closeBook(); if (ev.key === 'ArrowRight') flip(1); if (ev.key === 'ArrowLeft') flip(-1); }); window.addEventListener('hashchange',function () { if (window.location.hash !== '#lab') closeBook(); }); render(); console.log('IWMO BAD IDEAS: simplified notebook ready'); return true; } if (!setup()) { document.addEventListener('DOMContentLoaded',setup,{once:true}); window.addEventListener('load',setup,{once:true}); } })();