mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-11-04 10:05:51 +00:00
27 lines
472 B
HTML
27 lines
472 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
|
<script>
|
|
|
|
|
|
function waitOnPushMessage(pushSubscription)
|
|
{
|
|
var p = new Promise(function(res, rej) {
|
|
navigator.serviceWorker.onmessage = function(e) {
|
|
if (e.data.type == "finished") {
|
|
(e.data.okay == "yes" ? res : rej)(e.data);
|
|
}
|
|
};
|
|
});
|
|
return p;
|
|
}
|
|
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
</body>
|
|
</html>
|