2018-10-26 20:54:03 +08:00
|
|
|
/* eslint-disable */
|
2018-11-19 18:46:26 +08:00
|
|
|
|
2019-12-11 22:07:22 +08:00
|
|
|
// Any IE only polyfill should be moved in discourse-internet-explorer plugin
|
2019-01-04 01:03:01 +08:00
|
|
|
|
2019-04-29 22:58:17 +08:00
|
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags#Polyfill
|
2019-12-11 22:07:22 +08:00
|
|
|
// IE and EDGE
|
2019-04-29 22:58:17 +08:00
|
|
|
if (RegExp.prototype.flags === undefined) {
|
|
|
|
Object.defineProperty(RegExp.prototype, "flags", {
|
|
|
|
configurable: true,
|
|
|
|
get: function() {
|
|
|
|
return this.toString().match(/[gimsuy]*$/)[0];
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2018-10-26 20:54:03 +08:00
|
|
|
/* eslint-enable */
|