From 005dd00b7ff4bcf42410f440d91b57875fe8a90f Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Wed, 5 Jun 2019 08:55:29 +0200 Subject: Don't submit when QRY prompt cancelled --- template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.go b/template.go index e7c6634..6e541e2 100644 --- a/template.go +++ b/template.go @@ -24,7 +24,7 @@ while (i--) { qry[i].addEventListener('click', function(e) { e.preventDefault(); var resp=prompt("Please enter required input: ", "") - if (resp !== "") window.location = e.target.href + "?" + resp + if (resp !== null && resp !== "") window.location = e.target.href + "?" + resp return false; }) } -- cgit v1.2.3-70-g09d2