| @@ -4,6 +4,18 @@ document.querySelector('#content').innerHTML = `<h1>Raspberry Settings</h1> | |||||
| <table> | <table> | ||||
| <tbody id="keys"> | <tbody id="keys"> | ||||
| </tbody> | |||||
| </table> | |||||
| </fieldset> | |||||
| <fieldset> | |||||
| <legend>Miscellaneous</legend> | |||||
| <table> | |||||
| <tbody> | |||||
| <tr> | |||||
| <td><label for="jump-point">Jump Point</label></td> | |||||
| <td><input type="text" id="jump-point"></td> | |||||
| <td><input type="button" class="button" id="set-jump-point" value="Set"></td> | |||||
| </tr> | |||||
| </tbody> | </tbody> | ||||
| </table> | </table> | ||||
| </fieldset>`; | </fieldset>`; | ||||
| @@ -48,4 +60,12 @@ async function addKeySetter(functionName: string, displayName?: string) | |||||
| else | else | ||||
| await addKeySetter(keybinds[i].functionName); | await addKeySetter(keybinds[i].functionName); | ||||
| } | } | ||||
| // Other settings | |||||
| (document.querySelector('#jump-point') as HTMLInputElement).value = await getStorageValue('jp'); | |||||
| document.querySelector('#set-jump-point').addEventListener('click', async (e: MouseEvent): Promise<void> => | |||||
| { | |||||
| const jumpPoint: string = canonicalize((document.querySelector('#jump-point') as HTMLInputElement).value); | |||||
| await setStorageValue('jp', jumpPoint); | |||||
| }); | |||||
| })(); | })(); | ||||