mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 03:29:51 +02:00
feat: added auto refresh
This commit is contained in:
1 parent
3fd90588a3
commit
90d4b76b31
3 files changed
+30
-9
No files matched your search
@@ -0,0 +1,23 @@
|
||||
export default function withAutoRefresh(svg: string, refreshAfter: number) {
|
||||
return `
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, ${refreshAfter});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
${svg}
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
}
|
||||
Reference in new issue
Block a user