From 1d4c5d51dfa2ac33541a92b8194b76c9f9fbd60b Mon Sep 17 00:00:00 2001 From: Paul Rodwell Date: Mon, 17 Apr 2023 09:45:28 +0100 Subject: [PATCH] update jQuery click handlers --- client/security.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/security.coffee b/client/security.coffee index 2ea4621..2d8eb4a 100644 --- a/client/security.coffee +++ b/client/security.coffee @@ -59,7 +59,7 @@ update_footer = (ownerName, isAuthenticated) -> logoutTitle = "Not Owner : Sign-out" logoutIconClass = 'fa fa-lock fa-lg fa-fw notOwner' $('footer > #security').append "" - $('footer > #security > #logout').click (e) -> + $('footer > #security > #logout').on 'click', (e) -> e.preventDefault() myInit = { method: 'GET' @@ -79,14 +79,14 @@ update_footer = (ownerName, isAuthenticated) -> # These probably should move into a menu, but this is far easier to begin with if !isClaimed $('footer > #security').append "" - $('footer > #security > #claim').click (e) -> + $('footer > #security > #claim').on 'click', (e) -> e.preventDefault() claim_wiki() else # only offer to add alternative id if using persona - at least initially. if settings.usingPersona $('footer > #security').append "" - $('footer > #security > #addAltAuth').click (e) -> + $('footer > #security > #addAltAuth').on 'click', (e) -> e.preventDefault document.cookie = "wikiName=#{window.location.host}" + ";domain=.#{settings.cookieDomain}; path=/; max-age=300; sameSite=Strict;" @@ -135,7 +135,7 @@ update_footer = (ownerName, isAuthenticated) -> else signonTitle = 'Wiki Owner Sign-on' $('footer > #security').append "" - $('footer > #security > #show-security-dialog').click (e) -> + $('footer > #security > #show-security-dialog').on 'click', (e) -> e.preventDefault() document.cookie = "wikiName=#{window.location.host}" + ";domain=.#{settings.cookieDomain}; path=/; max-age=300; sameSite=Strict;"