file_scrollRestoration_navigate.html (449B)
1 <!DOCTYPE HTML> 2 <script> 3 var bc = new BroadcastChannel("navigate"); 4 window.onload = () => { 5 bc.onmessage = (event) => { 6 if (event.data.command == "navigate") { 7 window.location = event.data.location; 8 bc.close(); 9 } 10 if (event.data.command == "back") { 11 history.back(); 12 bc.close(); 13 } 14 } 15 bc.postMessage({command: "loaded", scrollRestoration: history.scrollRestoration}); 16 } 17 </script>