From 094123b768bd3ebcdaf79e09b0fcdef3c620bccf Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Wed, 2 Oct 2024 14:09:51 +0300 Subject: [PATCH] set refresh interval for regular refresh --- script.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index e776ec9..78d22e3 100644 --- a/script.js +++ b/script.js @@ -39,4 +39,11 @@ const form = document.getElementById('merge-form'); console.error(error); result.innerHTML = 'Error merging calendars'; }); - }); \ No newline at end of file + }); + + //regular refresh + const refreshInterval = 60 * 60 * 1000; // 1 hour + setInterval(() => { + // Fetch new calendar data and update the merged calendar + updateMergedCalendar(); + }, refreshInterval); \ No newline at end of file