diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 046461f..099fa36 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -78,6 +78,10 @@ "message": "By the strictness philosophy, the only way to cancel a running timer is to disable the extension.", "description": "On the options page, note below the label for the click-restarts checkbox explaining that this will not allow users to *cancel* a running timer" }, + "options_auto_mode": { + "message": "Will trigger timer automatically on browser launch and at the end of pause.", + "description": "On the options page, label for the checkbox that enables/disables the automcatic mode" + }, "options_save_changes": { "message": "Save changes", "description": "On the options page, text for the submit button" diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index 96fa4d2..0cb7db1 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -58,6 +58,10 @@ "message": "Время должно быть задано в формате «мм» или «мм:сс»", "description": "On the options page, error message indicating bad format for timer duration" }, + "options_show_notifications": { + "message": "Показывать уведомления, когда счетчик достигнет нуля", + "description": "On the options page, label for the checkbox that enables/disables the notification at the end of a timer" + }, "options_should_ring": { "message": "Звенеть, когда счетчик достигнет нуля (будет звук)", "description": "On the options page, label for the checkbox that enables/disables ringing sound at the end of a timer" @@ -70,6 +74,10 @@ "message": "Согласно строгим правилам, единственным способом остановки бегущего счетчика является отключение расширения.", "description": "On the options page, note below the label for the click-restarts checkbox explaining that this will not allow users to *cancel* a running timer" }, + "options_auto_mode": { + "message": "Автоматически запускать счетчик при запуске браузера и после паузы.", + "description": "On the options page, label for the checkbox that enables/disables the automcatic mode" + }, "options_save_changes": { "message": "Сохранить изменения", "description": "On the options page, text for the submit button" diff --git a/_locales/uk/messages.json b/_locales/uk/messages.json index ef048a0..f53641e 100644 --- a/_locales/uk/messages.json +++ b/_locales/uk/messages.json @@ -58,6 +58,10 @@ "message": "Час має бути задано у вигляді «хх» або «хх:сс»", "description": "On the options page, error message indicating bad format for timer duration" }, + "options_show_notifications": { + "message": "Показувати повідомлення, коли лічильник дійде до нуля", + "description": "On the options page, label for the checkbox that enables/disables the notification at the end of a timer" + }, "options_should_ring": { "message": "Дзвеніти, коли лічильник дійде до нуля (буде зі звуком)", "description": "On the options page, label for the checkbox that enables/disables ringing sound at the end of a timer" @@ -70,6 +74,10 @@ "message": "У відповідності до суворих правил, єдиним способом зупинки лічильника є відключення розширення.", "description": "On the options page, note below the label for the click-restarts checkbox explaining that this will not allow users to *cancel* a running timer" }, + "options_auto_mode": { + "message": "Автоматично запускати лічильник при запуску браузера і по завершенні паузи.", + "description": "On the options page, label for the checkbox that enables/disables the automcatic mode" + }, "options_save_changes": { "message": "Зберегти зміни", "description": "On the options page, text for the submit button" diff --git a/background.js b/background.js index 460bae1..f51bdf1 100644 --- a/background.js +++ b/background.js @@ -313,6 +313,10 @@ var notification, mainPomodoro = new Pomodoro({ console.log("playing ring", RING); RING.play(); } + + if(timer.pomodoro.nextMode == 'work' && PREFS.autoMode) { + timer.pomodoro.start(); + } }, onStart: function (timer) { chrome.browserAction.setIcon({ @@ -357,3 +361,6 @@ chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) { } }); +if(PREFS.autoMode) { + mainPomodoro.start(); +} diff --git a/options.html b/options.html index 65e55ec..12c7e80 100644 --- a/options.html +++ b/options.html @@ -147,6 +147,10 @@
+