// @name Office Fitness Break Reminder // @desc Reminds you to take periodic breaks with exercises at your desk. // @url http://www.fitness-break.com/?bubbles new function() { //SSB.console.init("debug"); SSB.setIcon('http://www.fitness-break.com/favicon.ico'); SSB.prefs.setValue('breakInterval','m30'); SSB.prefs.pane.addPrefs([ { type:'options', defVal:'m30', name:'breakInterval', title:'Break interval', options:{ m20:'20 minutes', m30:'30 minutes', m40:'40 minutes', m50:'50 minutes' } }]); SSB.prefs.pane.onSubmit = function() { scheduleBreak(); } } function ssbNotify() { SSB.notify( getStringFromFunction( notificationHTML ),300,160,300); } /* * Gets function reference and returns string of first matched text between commented * block just like this one. */ function getStringFromFunction(fnc) { var string = fnc.toString(); return string.match(/\/\*([\s\S]*)\*\//)[1]; } function notificationHTML() {/*