summaryrefslogtreecommitdiffstats
path: root/core/js/compatibility.js
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-02-14 12:59:26 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-02-14 12:59:26 +0100
commite643742eb3428c6a0cf6322f09152f22d00e0502 (patch)
tree906c2104120fd0de69e545a997aa1233b320a6e1 /core/js/compatibility.js
parent8065c73339fe624a2b833cbb283887d4e2e58bdf (diff)
downloadnextcloud-server-e643742eb3428c6a0cf6322f09152f22d00e0502.tar.gz
nextcloud-server-e643742eb3428c6a0cf6322f09152f22d00e0502.zip
adding prototype trim as fallback for IE8
Diffstat (limited to 'core/js/compatibility.js')
-rw-r--r--core/js/compatibility.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/js/compatibility.js b/core/js/compatibility.js
index 3e9178f3200..0cfeefab871 100644
--- a/core/js/compatibility.js
+++ b/core/js/compatibility.js
@@ -23,3 +23,10 @@ if (!Function.prototype.bind) {
return fBound;
};
}
+
+//https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/Trim
+if(!String.prototype.trim) {
+ String.prototype.trim = function () {
+ return this.replace(/^\s+|\s+$/g,'');
+ };
+} \ No newline at end of file