Remove polyfills: we don't support IE anymore (#18)

* Remove polyfills: we don't support IE anymore
This commit is contained in:
Alexander Skvortsov 2020-08-16 16:32:19 -04:00 committed by GitHub
parent f390676f2f
commit a232d8bcfc
2 changed files with 0 additions and 20 deletions

View File

@ -11,12 +11,10 @@ import { extend } from 'flarum/extend';
import TextEditor from 'flarum/components/TextEditor';
import MarkdownArea from 'mdarea';
import './polyfills';
import MarkdownToolbar from './components/MarkdownToolbar';
import MarkdownButton from './components/MarkdownButton';
app.initializers.add('flarum-markdown', function(app) {
let index = 1;
extend(TextEditor.prototype, 'init', function() {

View File

@ -1,18 +0,0 @@
/*! https://mths.be/startswith v0.2.0 by @mathias */
if (!String.prototype.startsWith) {
Object.defineProperty(String.prototype, 'startsWith', {
value: function(search, pos) {
pos = !pos || pos < 0 ? 0 : +pos;
return this.substring(pos, pos + search.length) === search;
}
});
}
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;
};
}