Allow only valid hrefs in newShare for map

This commit is contained in:
Max Berger
2026-03-07 23:57:44 +01:00
parent 25e571ad63
commit 93610213e3
4 changed files with 212 additions and 199 deletions

View File

@@ -20,6 +20,7 @@
import { add_share_by_map, add_share_by_token } from "./api.js";
import { Scene, pop_scene, scene_stack } from "./scene_manager.js";
import { onCleanHREFinput } from "./utils.js";
/**
* @implements {Scene}
@@ -45,6 +46,8 @@ export class NewShareScene {
/** @type {HTMLInputElement} */ let properties_input = html_scene.querySelector("[data-name=properties]");
/** @type {HTMLElement} */ let cancel_btn = html_scene.querySelector("[data-name=cancel]");
sharehref_input.addEventListener("input", onCleanHREFinput);
/** @type {?number} */ let scene_index = null;
function oncancel() {