blob: bb538eefec203f846cdbec6d2c08345504019bf5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<html>
<head>
<script>
onpageshow = function() {
let bc = new BroadcastChannel("navigation_type");
bc.onmessage = function(event) {
if (event.data == "loadNewPage") {
bc.close();
location.href = location.href + "?next";
} else if (event.data == "back") {
bc.close();
history.back();
} else if (event.data == "close") {
window.close();
bc.postMessage("closed");
bc.close();
}
}
bc.postMessage({ navigationType: performance.navigation.type });
}
</script>
</head>
<body>
</body>
</html>
|