Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 10x 10x 9x 9x 3x 3x 3x 3x 3x 2x 2x 10x | function storageCommands( e: StorageEvent, formEl: HTMLFormElement, snap_name: string, ignoreChangesOnUnload: Function, context = window, ) { const key = `${snap_name}-command`; if (e.key === key) { context.localStorage.removeItem(key); switch (e.newValue) { case "edit": context.focus(); break; case "revert": ignoreChangesOnUnload(); context.location.reload(); break; case "save": formEl.dispatchEvent(new Event("submit")); break; } } return; } export { storageCommands }; |