APIs for links and references in the ATmosphere

try the button

+14 -1
+14 -1
who-am-i/templates/prompt.hbs
··· 29 30 <div id="need-storage" class="hidden"> 31 <p class="problem">Sorry, your browser is blocking access.</p> 32 - <p>Try <a href="/" target="_blank">connecting directly</a> first (but no promises).</p> 33 </div> 34 35 ··· 45 const allowEl = document.getElementById('handle-action'); // for known-did 46 const connectEl = document.getElementById('connect'); // for anon 47 const needStorageEl = document.getElementById('need-storage'); // for safari/frame isolation 48 49 function err(e, msg) { 50 loaderEl.classList.add('hidden'); ··· 80 promptEl.classList.add('hidden'); 81 infoEl.classList.add('hidden'); 82 needStorageEl.classList.remove('hidden'); 83 } 84 }); 85 }
··· 29 30 <div id="need-storage" class="hidden"> 31 <p class="problem">Sorry, your browser is blocking access.</p> 32 + <p> 33 + Try <a href="/" target="_blank">connecting directly</a> first (but no promises). 34 + Clicking <button id="desperation">this button</button> might also help. 35 + </p> 36 </div> 37 38 ··· 48 const allowEl = document.getElementById('handle-action'); // for known-did 49 const connectEl = document.getElementById('connect'); // for anon 50 const needStorageEl = document.getElementById('need-storage'); // for safari/frame isolation 51 + const desperationEl = document.getElementById('desperation'); 52 53 function err(e, msg) { 54 loaderEl.classList.add('hidden'); ··· 84 promptEl.classList.add('hidden'); 85 infoEl.classList.add('hidden'); 86 needStorageEl.classList.remove('hidden'); 87 + desperation.addEventListener('click', () => { 88 + document.requestStorageAccess({ 89 + cookies: true, 90 + localStorage: true, 91 + }).then( 92 + () => desperation.textContent = "(maybe helped?)", 93 + () => desperation.textContent = "(doubtful)", 94 + ); 95 + }) 96 } 97 }); 98 }