// Nothing of interest from here on...\r
//-------------------------------------------------------\r
var panelNum = 0; // use 1 for second panel\r
-var version = "1.35";\r
+var version = "1.37";\r
var versionURL = "http://comingnext.sourceforge.net/version.xml";\r
var calendarService = null;\r
var cacheEntriesHtml = [];\r
}\r
}\r
\r
+function stringEndsWith(str, suffix)\r
+{\r
+ return str.indexOf(suffix, str.length - suffix.length) !== -1;\r
+}\r
+\r
// detects the system's current time format by parsing a native calendar timestamp (this is the only reliable formating across all devices and firmwares)\r
function detectTimeFormat(localeTimeString)\r
{\r
localeTimeString = localeTimeString.toLowerCase();\r
- use12hoursTimeFormat = localeTimeString.indexOf("am") != -1 || localeTimeString.indexOf("pm") != -1 ? true : false;\r
+ use12hoursTimeFormat = stringEndsWith(localeTimeString, "am") || stringEndsWith(localeTimeString, "pm");\r
timeFormatSeparator = localeTimeString.indexOf(":") != -1 ? ":" : ".";\r
}\r
\r
var text = config['nothingText'].Value.replace(/%d/, config['monthRange'].Value);\r
entriesHtml = '<div style="width:295px; height:75px; text-align:center; line-height:75px; overflow:visible;">' + text + '</div>';\r
}\r
+ log("output: " + entriesHtml);\r
if (cacheEntriesHtml != entriesHtml) {\r
if (mode == 0)\r
document.getElementById('calendarList').innerHTML = entriesHtml;\r
log('Warning: unknown or invalid setting: ' + stringlist[i]);\r
continue;\r
}\r
- log('stringlist: ' + key + '=\'' + value + '\'');\r
+ log('stringlist[' + i + ']: ' + key + '=\'' + value + '\'');\r
if (config[key].Type == 'Int') {\r
config[key].Value = Number(value);\r
if (isNaN(config[key].Value))\r
<p class="credits">Tokeda (russian translation)</p>\r
<p class="credits">Marcella Ferrari (italian translation)</p>\r
<p class="credits">Venos (italian translation)</p>\r
+ <p class="credits">Francisco Rodero (catalan translation)</p>\r
+ <p class="credits">zbigzbig20 (polish translation)</p>\r
<p>This software is open source and licensed under the GPLv3.</p>\r
<p>Visit <a onclick="widget.openURL('http://comingnext.sf.net/'); return false;" href="http://comingnext.sf.net/">comingnext.sf.net</a> for free updates.</p>\r
<hr />\r