feat: added auto refresh

This commit is contained in:
TresAbhi committed 2023-06-29 01:43:59 +00:00
1 parent 3fd90588a3
commit 90d4b76b31
3 files changed
+30 -9

No files matched your search

+23
View File
@@ -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>
`;
}