+14
-1
who-am-i/templates/prompt.hbs
+14
-1
who-am-i/templates/prompt.hbs
···
29
29
30
30
<div id="need-storage" class="hidden">
31
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>
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>
33
36
</div>
34
37
35
38
···
45
48
const allowEl = document.getElementById('handle-action'); // for known-did
46
49
const connectEl = document.getElementById('connect'); // for anon
47
50
const needStorageEl = document.getElementById('need-storage'); // for safari/frame isolation
51
+
const desperationEl = document.getElementById('desperation');
48
52
49
53
function err(e, msg) {
50
54
loaderEl.classList.add('hidden');
···
80
84
promptEl.classList.add('hidden');
81
85
infoEl.classList.add('hidden');
82
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
+
})
83
96
}
84
97
});
85
98
}