summaryrefslogtreecommitdiff
path: root/program/js/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/common.js')
-rw-r--r--program/js/common.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/program/js/common.js b/program/js/common.js
index afaf91639..02934f734 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -592,6 +592,14 @@ Date.prototype.getStdTimezoneOffset = function()
return tzo;
}
+// define String's startsWith() method for old browsers
+if (!String.prototype.startsWith) {
+ String.prototype.startsWith = function(search, position) {
+ position = position || 0;
+ return this.slice(position, search.length) === search;
+ };
+}
+
// Make getElementById() case-sensitive on IE
if (bw.ie) {
document._getElementById = document.getElementById;