Methods
(inner) addOptionToScriptSelect(sel, opt, args) → {void}
Add's an option to the script select
Parameters:
Name | Type | Description |
---|---|---|
sel |
HTMLElement | Select element to populate |
opt |
HTMLElement | Option element to add |
args |
object | Script arguments object |
- Source:
Returns:
- Type
- void
(inner) addScriptAPIcall(event) → {void}
Adds an API call to the script content element
Parameters:
Name | Type | Description |
---|---|---|
event |
Event | triggering event |
- Source:
Returns:
- Type
- void
(inner) addScriptArgument() → {void}
Appends an argument to the list of script arguments
- Source:
Returns:
- Type
- void
(inner) addScriptFunction(event) → {void}
Adds a function to the script content element
Parameters:
Name | Type | Description |
---|---|---|
event |
Event | triggering event |
- Source:
Returns:
- Type
- void
(inner) apiParamsToArgs(p) → {string}
Adds the documented api params to the options lua table for the add api call function
Parameters:
Name | Type | Description |
---|---|---|
p |
object | parameters object |
- Source:
Returns:
lua code
- Type
- string
(inner) deleteScript(el, script) → {void}
Deletes a script after confirmation
Parameters:
Name | Type | Description |
---|---|---|
el |
EventTarget | triggering element |
script |
string | script to delete |
- Source:
Returns:
- Type
- void
(inner) deleteScriptCheckError(obj) → {void}
Handler for the MYMPD_API_SCRIPT_RM jsonrpc response
Parameters:
Name | Type | Description |
---|---|---|
obj |
object | jsonrpc response |
- Source:
Returns:
- Type
- void
(inner) doImportScript(text) → {boolean}
Imports a script from the mympd-scripts repository
Parameters:
Name | Type | Description |
---|---|---|
text |
string | Script to import |
- Source:
Returns:
true on success, else false
- Type
- boolean
(inner) getScriptList(all) → {void}
Gets the list of scripts
Parameters:
Name | Type | Description |
---|---|---|
all |
boolean | true = get all scripts, false = get all scripts with pos > 0 |
- Source:
Returns:
- Type
- void
(inner) importScript(target) → {void}
Shows the edit script tab and imports a script
Parameters:
Name | Type | Description |
---|---|---|
target |
EventTarget | Event target |
- Source:
Returns:
- Type
- void
(inner) initModalScripts() → {void}
Initialization functions for the script elements
- Source:
Returns:
- Type
- void
(inner) parseEditScript(obj) → {void}
Parses the MYMPD_API_SCRIPT_GET jsonrpc response
Parameters:
Name | Type | Description |
---|---|---|
obj |
object | jsonrpc response |
- Source:
Returns:
- Type
- void
(inner) parseScriptList(obj) → {void}
Parses the MYMPD_API_SCRIPT_LIST jsonrpc response
Parameters:
Name | Type | Description |
---|---|---|
obj |
object | jsonrpc response |
- Source:
Returns:
- Type
- void
(inner) removeScriptArgument(ev) → {void}
Removes an argument from the list of script arguments
Parameters:
Name | Type | Description |
---|---|---|
ev |
Event | triggering element |
- Source:
Returns:
- Type
- void
(inner) saveScript(target) → {void}
Saves a script
Parameters:
Name | Type | Description |
---|---|---|
target |
Element | triggering element |
- Source:
Returns:
- Type
- void
(inner) saveScriptCheckError(obj) → {void}
Handler for the MYMPD_API_SCRIPT_SAVE jsonrpc response
Parameters:
Name | Type | Description |
---|---|---|
obj |
object | jsonrpc response |
- Source:
Returns:
- Type
- void
(inner) showEditScript(script) → {void}
Shows the edit script tab
Parameters:
Name | Type | Description |
---|---|---|
script |
string | script name |
- Source:
Returns:
- Type
- void
(inner) showEditScriptModal(script) → {void}
Opens the scripts modal and shows the edit tab
Parameters:
Name | Type | Description |
---|---|---|
script |
string | name to edit |
- Source:
Returns:
- Type
- void
(inner) showImportScript() → {void}
Shows the import scripts tab
- Source:
Returns:
- Type
- void
(inner) showListScriptModal() → {void}
Opens the scripts modal and shows the list tab
- Source:
Returns:
- Type
- void
(inner) showListScripts() → {void}
Shows the list scripts tab
- Source:
Returns:
- Type
- void
(inner) updateScript() → {void}
Updates a script from the mympd-scripts repository
- Source:
Returns:
- Type
- void
(inner) validateScript(target) → {void}
Validates a script
Parameters:
Name | Type | Description |
---|---|---|
target |
Element | triggering element |
- Source:
Returns:
- Type
- void
(inner) validateScriptCheckError(obj) → {void}
Handler for the MYMPD_API_SCRIPT_VALIDATE jsonrpc response
Parameters:
Name | Type | Description |
---|---|---|
obj |
object | jsonrpc response |
- Source:
Returns:
- Type
- void