summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Maps/resources/WikitextEditor/js/mapeditor.iefixes.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/Maps/resources/WikitextEditor/js/mapeditor.iefixes.js')
-rw-r--r--www/wiki/extensions/Maps/resources/WikitextEditor/js/mapeditor.iefixes.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/www/wiki/extensions/Maps/resources/WikitextEditor/js/mapeditor.iefixes.js b/www/wiki/extensions/Maps/resources/WikitextEditor/js/mapeditor.iefixes.js
new file mode 100644
index 00000000..a49e42fb
--- /dev/null
+++ b/www/wiki/extensions/Maps/resources/WikitextEditor/js/mapeditor.iefixes.js
@@ -0,0 +1,28 @@
+if (!Array.prototype.indexOf)
+{
+ Array.prototype.indexOf = function(elt /*, from*/)
+ {
+ var len = this.length >>> 0;
+
+ var from = Number(arguments[1]) || 0;
+ from = (from < 0)
+ ? Math.ceil(from)
+ : Math.floor(from);
+ if (from < 0)
+ from += len;
+
+ for (; from < len; from++)
+ {
+ if (from in this &&
+ this[from] === elt)
+ return from;
+ }
+ return -1;
+ };
+}
+
+if(typeof String.prototype.trim !== 'function') {
+ String.prototype.trim = function() {
+ return this.replace(/^\s+|\s+$/g, '');
+ }
+} \ No newline at end of file