From 4faf493d64a3bbc4d665a29ea4a12a49bce2e8e6 Mon Sep 17 00:00:00 2001 From: anvesh singh <127198268+anvesh-singh@users.noreply.github.com> Date: Thu, 10 Oct 2024 01:19:19 +0530 Subject: [PATCH 1/2] added the custom messaages in settings option --- background.js | 9 ++------- options.html | 10 ++++++++++ options.js | 7 +++++++ popup.js | 20 ++++++++++++++++++++ 4 files changed, 39 insertions(+), 7 deletions(-) diff --git a/background.js b/background.js index b891724..1565ef3 100644 --- a/background.js +++ b/background.js @@ -5,7 +5,7 @@ let timerInterval; let startTime; let elapsedTime = 0; let isTimerRunning = false; -const firstIntervalDuration = 20 * 60 * 1000; // 20 minutes in milliseconds +const firstIntervalDuration = 0.1667 * 60 * 1000; // 20 minutes in milliseconds const secondIntervalDuration = 20 * 1000; // 20 seconds for break // Start timer @@ -73,12 +73,7 @@ function formatTime(time) { // Function to notify break time function notifyBreakTime() { - chrome.notifications.create("breakTimeNotification", { - type: "basic", - iconUrl: "images/hourglass.png", - title: "Take a break!", - message: "It's time to take a break. Look at something 20 feet away for 20 seconds." - }); + chrome.runtime.sendMessage({ type: "breakTimeNotification"}); } // Function to start short break timer diff --git a/options.html b/options.html index 95fd0e5..9a6de51 100644 --- a/options.html +++ b/options.html @@ -17,7 +17,17 @@
Press the desired key combination and click Save.
+Set a custom alert message for yourself as a reminder
+