Skip to content

Commit

Permalink
增加自动关闭部分
Browse files Browse the repository at this point in the history
  • Loading branch information
Polaris-F committed Aug 28, 2024
1 parent 968f472 commit 05ea61f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@
</head>

<body>
<script>if (location.hash) { location.replace(location.hash.substring(1)) }</script>
<script>
if (location.hash) {
location.replace(location.hash.substring(1));
setTimeout(function() {
window.open('', '_self', ''); // 兼容部分浏览器允许关闭窗口
window.close();
}, 1000);
}
</script>
</body>

</html>

0 comments on commit 05ea61f

Please sign in to comment.