mirror of
https://gitlab.com/octtspacc/OcttKB
synced 2025-02-02 23:47:36 +01:00
19 lines
400 B
JavaScript
19 lines
400 B
JavaScript
/*\
|
|
Load our custom polyfills, for old browsers support.
|
|
\*/
|
|
exports.startup = function() {
|
|
try {
|
|
|
|
// https://stackoverflow.com/a/63958411
|
|
if (!String.prototype.replaceAll) {
|
|
String.prototype.replaceAll = function replaceAll(search, replace) {
|
|
return this.split(search).join(replace);
|
|
};
|
|
};
|
|
|
|
} catch(e) {
|
|
const Str = `${e.stack.split('\n')[0]}: ${e}`
|
|
console.log(Str);
|
|
return Str;
|
|
};
|
|
}; |