mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 07:50:24 +08:00
Remove polyfills: we don't support IE anymore (#18)
* Remove polyfills: we don't support IE anymore
This commit is contained in:
parent
f390676f2f
commit
a232d8bcfc
@ -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() {
|
||||
|
@ -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;
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user