tangled
alpha
login
or
join now
bad-example.com
/
microcosm-links
7
fork
atom
APIs for links and references in the ATmosphere
7
fork
atom
overview
issues
pulls
pipelines
try the button
bad-example.com
8 months ago
21a41584
b4bc0957
+14
-1
1 changed file
expand all
collapse all
unified
split
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
32
-
<p>Try <a href="/" target="_blank">connecting directly</a> first (but no promises).</p>
32
32
+
<p>
33
33
+
Try <a href="/" target="_blank">connecting directly</a> first (but no promises).
34
34
+
Clicking <button id="desperation">this button</button> might also help.
35
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
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
87
+
desperation.addEventListener('click', () => {
88
88
+
document.requestStorageAccess({
89
89
+
cookies: true,
90
90
+
localStorage: true,
91
91
+
}).then(
92
92
+
() => desperation.textContent = "(maybe helped?)",
93
93
+
() => desperation.textContent = "(doubtful)",
94
94
+
);
95
95
+
})
83
96
}
84
97
});
85
98
}