fix set-extension-mode commands

This commit is contained in:
Tamius Han 2022-07-26 01:04:36 +02:00
parent 8c403f106c
commit 2b749d6a3b
5 changed files with 13 additions and 13 deletions

View File

@ -10,7 +10,7 @@ export default {
}) || []; }) || [];
}, },
extensionActions: function(){ extensionActions: function(){
return this.scopeActions.filter(x => x.cmd.length === 1 && x.cmd[0].action === 'set-ExtensionMode') || []; return this.scopeActions.filter(x => x.cmd.length === 1 && x.cmd[0].action === 'set-extension-mode') || [];
}, },
aardActions: function(){ aardActions: function(){
return this.scopeActions.filter(x => x.cmd.length === 1 && x.cmd[0].action === 'set-autoar-mode') || []; return this.scopeActions.filter(x => x.cmd.length === 1 && x.cmd[0].action === 'set-autoar-mode') || [];

View File

@ -179,7 +179,7 @@ var ActionList = {
page: true, page: true,
} }
}, },
'set-ExtensionMode': { 'set-extension-mode': {
name: 'Set extension mode', name: 'Set extension mode',
args: [{ args: [{
name: 'Enable', name: 'Enable',

View File

@ -782,7 +782,7 @@ const ExtensionConf: SettingsInterface = {
name: 'Enable extension', name: 'Enable extension',
label: 'Enable', label: 'Enable',
cmd: [{ cmd: [{
action: 'set-ExtensionMode', action: 'set-extension-mode',
arg: ExtensionMode.Enabled, arg: ExtensionMode.Enabled,
persistent: true, persistent: true,
}], }],
@ -798,7 +798,7 @@ const ExtensionConf: SettingsInterface = {
name: 'Enable extension on whitelisted sites only', name: 'Enable extension on whitelisted sites only',
label: 'On whitelist only', label: 'On whitelist only',
cmd: [{ cmd: [{
action: 'set-ExtensionMode', action: 'set-extension-mode',
arg: ExtensionMode.Whitelist, arg: ExtensionMode.Whitelist,
persistent: true, persistent: true,
}], }],
@ -811,7 +811,7 @@ const ExtensionConf: SettingsInterface = {
name: 'Extension mode: use default settings', name: 'Extension mode: use default settings',
label: 'Default', label: 'Default',
cmd: [{ cmd: [{
action: 'set-ExtensionMode', action: 'set-extension-mode',
arg: ExtensionMode.Default, arg: ExtensionMode.Default,
persistent: true, persistent: true,
}], }],
@ -824,7 +824,7 @@ const ExtensionConf: SettingsInterface = {
name: 'Disable extension', name: 'Disable extension',
label: 'Disable', label: 'Disable',
cmd: [{ cmd: [{
action: 'set-ExtensionMode', action: 'set-extension-mode',
arg: ExtensionMode.Disabled, arg: ExtensionMode.Disabled,
persistent: true, persistent: true,
}], }],

View File

@ -63,7 +63,7 @@ class ExecAction {
this.settings.active.sites[site].stretch = cmd.arg; this.settings.active.sites[site].stretch = cmd.arg;
} else if (cmd.action === "set-alignment") { } else if (cmd.action === "set-alignment") {
this.settings.active.sites[site].videoAlignment = cmd.arg; this.settings.active.sites[site].videoAlignment = cmd.arg;
} else if (cmd.action === "set-ExtensionMode") { } else if (cmd.action === "set-extension-mode") {
this.settings.active.sites[site].mode = cmd.arg; this.settings.active.sites[site].mode = cmd.arg;
} else if (cmd.action === "set-autoar-mode") { } else if (cmd.action === "set-autoar-mode") {
this.settings.active.sites[site].autoar = cmd.arg; this.settings.active.sites[site].autoar = cmd.arg;