mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 13:06:40 +08:00
4abe4454dd
This core plugin, which could be split off in the future, allows us to load IE specific code on demand. Co-authored-by: jjaffeux <j.jaffeux@gmail.com>
17 lines
453 B
JavaScript
17 lines
453 B
JavaScript
/* eslint-disable */
|
|
|
|
// Any IE only polyfill should be moved in discourse-internet-explorer plugin
|
|
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags#Polyfill
|
|
// IE and EDGE
|
|
if (RegExp.prototype.flags === undefined) {
|
|
Object.defineProperty(RegExp.prototype, "flags", {
|
|
configurable: true,
|
|
get: function() {
|
|
return this.toString().match(/[gimsuy]*$/)[0];
|
|
}
|
|
});
|
|
}
|
|
|
|
/* eslint-enable */
|