1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-16 18:06:55 +00:00
This commit is contained in:
CommanderRoot 2023-11-21 14:00:04 -07:00 committed by GitHub
commit 323e923e2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 9 deletions

View file

@ -8,7 +8,7 @@ const dir = 'styles/fontello';
for(const file of fs.readdirSync(dir)) { for(const file of fs.readdirSync(dir)) {
if ( file.endsWith('.css') ) { if ( file.endsWith('.css') ) {
const old_path = path.join(dir, file), 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); fs.renameSync(old_path, new_path);
} }

View file

@ -376,7 +376,7 @@ function mention_processAll(tokens, msg, user, color_mentions) {
this.applyHighlight(msg, priority, null, 'mention', true); this.applyHighlight(msg, priority, null, 'mention', true);
// Push the remaining text from the token. // Push the remaining text from the token.
text.push(segment.substr(match[0].length)); text.push(segment.slice(match[0].length));
} }
} else } else
@ -493,7 +493,7 @@ export const Mentions = {
this.applyHighlight(msg, priority, null, 'mention', true); this.applyHighlight(msg, priority, null, 'mention', true);
// Push the remaining text from the token. // Push the remaining text from the token.
text.push(segment.substr(match[0].length)); text.push(segment.slice(match[0].length));
} else } else
text.push(segment); text.push(segment);

View file

@ -438,8 +438,8 @@ export default {
if ( idx === -1 ) if ( idx === -1 )
msg.user = null; msg.user = null;
else { else {
msg.user = msg.prefix.substr(0, idx); msg.user = msg.prefix.slice(0, idx);
msg.prefix = msg.prefix.substr(idx); msg.prefix = msg.prefix.slice(idx);
} }
return msg; return msg;

View file

@ -553,7 +553,7 @@ export default {
if ( values ) if ( values )
for(const [key, value] of Object.entries(values)) { for(const [key, value] of Object.entries(values)) {
if ( key.startsWith(prefix) ) { if ( key.startsWith(prefix) ) {
prof.set(key.substr(prefix.length), value); prof.set(key.slice(prefix.length), value);
i++; i++;
} }
} }

View file

@ -104,7 +104,7 @@ export default {
out.push({ out.push({
key: part.name, key: part.name,
i18n: `settings.filter.page.route.${this.route.name}.${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 optional: part.optional
}); });
} }

View file

@ -277,7 +277,7 @@ export default class SettingsContext extends EventEmitter {
if ( prefix && this._context_objects.has(prefix) ) { if ( prefix && this._context_objects.has(prefix) ) {
for(const key of Object.keys(this._context) ) for(const key of Object.keys(this._context) )
if ( key.startsWith(prefix) ) { if ( key.startsWith(prefix) ) {
const partial_key = key.substr(prefix.length); const partial_key = key.slice(prefix.length);
if ( ! keys.includes(partial_key) ) if ( ! keys.includes(partial_key) )
keys.push(partial_key); keys.push(partial_key);
} }

View file

@ -690,7 +690,7 @@ export default class SettingsManager extends Module {
// If we're still here, it means an individual setting was changed. // 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 // Look up the profile it belongs to and emit a changed event from
// that profile, thus notifying any contexts or UI instances. // that profile, thus notifying any contexts or UI instances.
key = key.substr(2); key = key.slice(2);
// Is it a value? // Is it a value?
const idx = key.indexOf(':'); const idx = key.indexOf(':');