diff --git a/src/ServicePulse.Host/app/index.html b/src/ServicePulse.Host/app/index.html index 5018620625..de8332194f 100644 --- a/src/ServicePulse.Host/app/index.html +++ b/src/ServicePulse.Host/app/index.html @@ -240,5 +240,6 @@

Warning!

+ diff --git a/src/ServicePulse.Host/app/js/polyfill/string.prototype.endsWith.js b/src/ServicePulse.Host/app/js/polyfill/string.prototype.endsWith.js new file mode 100644 index 0000000000..a4cde01f68 --- /dev/null +++ b/src/ServicePulse.Host/app/js/polyfill/string.prototype.endsWith.js @@ -0,0 +1,11 @@ +// Code taken from MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith#Polyfill +// which is shared using the following license: cc-by-sa 2.5 https://creativecommons.org/licenses/by-sa/2.5/ +// https://tc39.github.io/ecma262/#sec-array.prototype.find +if (!String.prototype.endsWith) { + String.prototype.endsWith = function(search, this_len) { + if (this_len === undefined || this_len > this.length) { + this_len = this.length; + } + return this.substring(this_len - search.length, this_len) === search; + }; +} \ No newline at end of file