I think this fixes posting.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4271 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
38e313350e
commit
a69fb5eeac
@ -644,7 +644,8 @@ function api_localStorageGet(key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function api_requestPermission(permission, id) {
|
function api_requestPermission(permission, id) {
|
||||||
let permissions = document.getElementById('permissions');
|
let outer = document.createElement('div');
|
||||||
|
outer.classList.add('permissions');
|
||||||
|
|
||||||
let container = document.createElement('div');
|
let container = document.createElement('div');
|
||||||
container.classList.add('permissions_contents');
|
container.classList.add('permissions_contents');
|
||||||
@ -688,17 +689,14 @@ function api_requestPermission(permission, id) {
|
|||||||
button.innerText = option.text;
|
button.innerText = option.text;
|
||||||
button.onclick = function() {
|
button.onclick = function() {
|
||||||
resolve(option.grant[check.checked ? 1 : 0]);
|
resolve(option.grant[check.checked ? 1 : 0]);
|
||||||
while (permissions.firstChild) {
|
document.body.removeChild(outer);
|
||||||
permissions.removeChild(permissions.firstChild);
|
|
||||||
}
|
|
||||||
permissions.style.visibility = 'hidden';
|
|
||||||
}
|
}
|
||||||
div.appendChild(button);
|
div.appendChild(button);
|
||||||
}
|
}
|
||||||
container.appendChild(div);
|
container.appendChild(div);
|
||||||
|
outer.appendChild(container);
|
||||||
|
|
||||||
permissions.appendChild(container);
|
document.body.appendChild(outer);
|
||||||
permissions.style.visibility = 'visible';
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,8 +230,7 @@ kbd {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
#permissions {
|
.permissions {
|
||||||
visibility: hidden;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: block;
|
display: block;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user