Skip to content

Commit 48f1b5e

Browse files
authored
Merge pull request #17 from kromiii/remove-force-reload
Remove force reload
2 parents 422303d + 29cb3cd commit 48f1b5e

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/index.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ const pageId = getPageId(url);
4747
// get the theme from the --theme flag
4848
const theme = args.theme as string;
4949

50-
// prepare to open the file in the browser
51-
// const opener = require('opener');
52-
5350
// download the page and convert it to markdown slides
5451
const app = express();
5552
const port = args.port as number;
@@ -61,23 +58,6 @@ app.get('/', async (req: express.Request, res: express.Response) => {
6158
<html>
6259
<head>
6360
<title>Notion to Slides</title>
64-
<script>
65-
setInterval(async () => {
66-
try {
67-
const response = await fetch('/');
68-
if (!response.ok) {
69-
throw new Error('Network response was not ok');
70-
}
71-
const newHtmlString = await response.text();
72-
if (document.body.innerHTML !== newHtmlString) {
73-
document.body.innerHTML = newHtmlString;
74-
console.log('Page updated!');
75-
}
76-
} catch (error) {
77-
console.error('Error fetching updates:', error);
78-
}
79-
}, 5000);
80-
</script>
8161
</head>
8262
<body>
8363
${htmlString}

0 commit comments

Comments
 (0)