mirror of
https://gitlab.com/octtspacc/OcttKB
synced 2025-02-03 16:07:37 +01:00
17 lines
358 B
JavaScript
17 lines
358 B
JavaScript
|
/*\
|
||
|
Load our custom polyfills, for old browsers support.
|
||
|
\*/
|
||
|
exports.startup = function() {
|
||
|
try {
|
||
|
|
||
|
// https://stackoverflow.com/a/63958411
|
||
|
String.prototype.replaceAllTxt = 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;
|
||
|
};
|
||
|
};
|