add single text scroll option #57

This commit is contained in:
Matt Walsh 2025-06-28 09:20:10 -05:00
commit 9f9667c895
No known key found for this signature in database
2 changed files with 33 additions and 6 deletions

View file

@ -11,6 +11,7 @@ const DEFAULTS = {
sticky: true,
values: [],
visible: true,
placeholder: '',
};
class Setting {
@ -31,6 +32,7 @@ class Setting {
this.values = options.values;
this.visible = options.visible;
this.changeAction = options.changeAction;
this.placeholder = options.placeholder;
// get value from url
const urlValue = parseQueryString()?.[`settings-${shortName}-${this.type}`];
@ -141,6 +143,7 @@ class Setting {
textInput.value = this.myValue;
textInput.id = `settings-${this.shortName}-string`;
textInput.name = `settings-${this.shortName}-string`;
textInput.placeholder = this.placeholder;
// set button
const setButton = document.createElement('input');
setButton.type = 'button';