diff --git a/bin/update_fonts.js b/bin/update_fonts.js index e3c9788d..b15fcda6 100644 --- a/bin/update_fonts.js +++ b/bin/update_fonts.js @@ -8,7 +8,7 @@ const dir = 'styles/fontello'; for(const file of fs.readdirSync(dir)) { if ( file.endsWith('.css') ) { const old_path = path.join(dir, file), - new_path = `${old_path.substr(0, old_path.length - 4)}.scss`; + new_path = `${old_path.slice(0, -4)}.scss`; fs.renameSync(old_path, new_path); } diff --git a/src/modules/chat/tokenizers.jsx b/src/modules/chat/tokenizers.jsx index 8e43cdc2..91526a50 100644 --- a/src/modules/chat/tokenizers.jsx +++ b/src/modules/chat/tokenizers.jsx @@ -400,7 +400,7 @@ export const Mentions = { this.applyHighlight(msg, priority, null, 'mention', true); // Push the remaining text from the token. - text.push(segment.substr(match[0].length)); + text.push(segment.slice(match[0].length)); } else text.push(segment); diff --git a/src/modules/main_menu/components/profile-manager.vue b/src/modules/main_menu/components/profile-manager.vue index cbf9fdc4..34648c0e 100644 --- a/src/modules/main_menu/components/profile-manager.vue +++ b/src/modules/main_menu/components/profile-manager.vue @@ -543,7 +543,7 @@ export default { if ( values ) for(const [key, value] of Object.entries(values)) { if ( key.startsWith(prefix) ) { - prof.set(key.substr(prefix.length), value); + prof.set(key.slice(prefix.length), value); i++; } } diff --git a/src/settings/components/page.vue b/src/settings/components/page.vue index 248a3ffc..d6e4e448 100644 --- a/src/settings/components/page.vue +++ b/src/settings/components/page.vue @@ -104,7 +104,7 @@ export default { out.push({ key: part.name, i18n: `settings.filter.page.route.${this.route.name}.${part.name}`, - title: name[0].toLocaleUpperCase() + name.substr(1), + title: name[0].toLocaleUpperCase() + name.slice(1), optional: part.optional }); } diff --git a/src/settings/context.js b/src/settings/context.js index 4c224628..08577815 100644 --- a/src/settings/context.js +++ b/src/settings/context.js @@ -277,7 +277,7 @@ export default class SettingsContext extends EventEmitter { if ( prefix && this._context_objects.has(prefix) ) { for(const key of Object.keys(this._context) ) if ( key.startsWith(prefix) ) { - const partial_key = key.substr(prefix.length); + const partial_key = key.slice(prefix.length); if ( ! keys.includes(partial_key) ) keys.push(partial_key); } diff --git a/src/settings/index.js b/src/settings/index.js index be5f4d77..027bb46b 100644 --- a/src/settings/index.js +++ b/src/settings/index.js @@ -671,7 +671,7 @@ export default class SettingsManager extends Module { // If we're still here, it means an individual setting was changed. // Look up the profile it belongs to and emit a changed event from // that profile, thus notifying any contexts or UI instances. - key = key.substr(2); + key = key.slice(2); // Is it a value? const idx = key.indexOf(':'); diff --git a/webpack.web.prod.js b/webpack.web.prod.js index a442395a..e4be2884 100644 --- a/webpack.web.prod.js +++ b/webpack.web.prod.js @@ -54,7 +54,7 @@ module.exports = merge(common, { publicPath: '', map: data => { if ( data.name.endsWith('.scss') ) - data.name = `${data.name.substr(0,data.name.length - 5)}.css`; + data.name = `${data.name.slice(0, -5)}.css`; return data; }