got it passing scripts and params but wtf is it bitching about with

x_opt = axis_options[x_type]
TypeError: list indices must be integers or slices, not str
This commit is contained in:
tim h 2023-01-20 18:53:16 -06:00
parent 337f8ed399
commit 025d50a10e
3 changed files with 22 additions and 4 deletions

View file

@ -312,7 +312,10 @@
</div>
<!-- Manual Scripts-->
<div id="ui-script" class="floating-window" style="right: 10px; top: 400px">
<div
id="ui-script"
class="floating-window"
style="right: 10px; top: 400px; display: none">
<div class="draggable floating-window-title">Manual Script</div>
<div class="menu-container" style="min-width: 200px">
<div id="script-name" class="script-name">
@ -321,10 +324,10 @@
<input id="script-name-input" />
<br />
</div>
<div id="script-json" class="script-json">
<label for="script-json-input">Script JSON Object:</label>
<div id="script-args" class="script-args">
<label for="script-args-input">Script Args List:</label>
<br />
<textarea id="script-json-input"></textarea>
<textarea id="script-args-input"></textarea>
<br />
</div>
</div>

View file

@ -29,3 +29,11 @@ keyboard.onShortcut({key: "KeyU"}, () => {
keyboard.onShortcut({key: "KeyN"}, () => {
tools.interrogate.enable();
});
keyboard.onShortcut({key: "Backquote"}, () => {
var hax0r = document.getElementById("ui-script");
if (hax0r.style.display === "none") {
hax0r.style.display = "block";
} else {
hax0r.style.display = "none";
}
});

View file

@ -96,6 +96,13 @@ const generating = (val) => {
*/
const _dream = async (endpoint, request) => {
const apiURL = `${host}${config.api.path}${endpoint}`;
// if script fields are populated add them to the request
var scriptName = document.getElementById("script-name-input").value;
var scriptArgs = document.getElementById("script-args-input").value;
if (scriptName.trim() != "" && scriptArgs.trim() != "") {
request.script_name = scriptName;
request.script_args = scriptArgs.split(",");
}
// Debugging is enabled
if (global.debug) {