diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d244cdd..bae82c0 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -70,6 +70,10 @@ "message": "Ring when a timer finishes (audio)", "description": "On the options page, label for the checkbox that enables/disables ringing sound at the end of a timer" }, + "options_auto_mode": { + "message": "Alternate between work and break cycles automatically", + "description": "On the options page, label for the checkbox that enables/disables automatic flipping between work and break modes" + }, "options_click_restarts": { "message": "Clicking on a running timer restarts it", "description": "On the options page, label for the checkbox that enables/disables the feature that clicking on a running timer restarts it" diff --git a/background.js b/background.js index d09ff79..b7f8d05 100644 --- a/background.js +++ b/background.js @@ -318,6 +318,13 @@ var notification, mainPomodoro = new Pomodoro({ console.log("playing ring", RING); RING.play(); } + + // If auto-mode is set, restart the cycle by calling start + // To Do: International strings + if(PREFS.autoMode) { + setTimeout(function(){mainPomodoro.start();}, 30000); + } + }, onStart: function (timer) { chrome.browserAction.setIcon({ diff --git a/options.html b/options.html index d97ca87..638d9b2 100644 --- a/options.html +++ b/options.html @@ -135,6 +135,10 @@

+
+ + +