summaryrefslogtreecommitdiff
path: root/views/event.handlebars
diff options
context:
space:
mode:
authorRaphael <mail@raphaelkabo.com>2023-10-09 20:10:29 +0100
committerGitHub <noreply@github.com>2023-10-09 20:10:29 +0100
commitf716861b6430d4561b2cf70cd9f0d99accf49392 (patch)
tree6f96696b583e4fab1a2d1f54a2f99bcee3267c04 /views/event.handlebars
parentcc6fcb4c405d8cffacbf9b1082abf61e918482fa (diff)
parent7fe1f42d56edb98875399b1da5e9b7e972209a0d (diff)
Merge pull request #115 from lowercasename/rk/typescript
Typescript migration project (event group linker)
Diffstat (limited to 'views/event.handlebars')
-rwxr-xr-xviews/event.handlebars4
1 files changed, 3 insertions, 1 deletions
diff --git a/views/event.handlebars b/views/event.handlebars
index ae6674a..f4f1a2e 100755
--- a/views/event.handlebars
+++ b/views/event.handlebars
@@ -423,9 +423,9 @@ window.eventData = {{{ json jsonData }}};
$(this).closest(".comment").find(".replyContainer").slideToggle();
})
$(document).ready(function() {
-
// Save the editing token from the URL, if it is valid
const eventID = $('#eventName').attr('data-event-id');
+ const url = new URL(window.location.href);
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.has('e')) {
$.ajax({
@@ -463,6 +463,8 @@ window.eventData = {{{ json jsonData }}};
if (urlParams.has('show_edit')) {
$('#editModal').modal('show');
+ url.searchParams.delete('show_edit');
+ history.replaceState(history.state, '', url.href);
}
// From https://davidwalsh.name/javascript-download