From 4b48485bcc9f73662a1eb4ab3142bb0f4d5bef7a Mon Sep 17 00:00:00 2001 From: retoor Date: Fri, 24 Jan 2025 14:05:47 +0100 Subject: [PATCH] Complete system. --- src/snek/static/fancy-button.js | 4 +++- src/snek/templates/about.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/snek/static/fancy-button.js b/src/snek/static/fancy-button.js index 5407a3b..a3e28f8 100644 --- a/src/snek/static/fancy-button.js +++ b/src/snek/static/fancy-button.js @@ -44,7 +44,9 @@ class FancyButton extends HTMLElement { const me = this this.buttonElement.appendChild(document.createTextNode(this.getAttribute("text"))) this.buttonElement.addEventListener("click",()=>{ - if(me.url){ + if(me.url == "/back" || me.url == "/back/"){ + window.history.back() + }else if(me.url){ window.location = me.url } }) diff --git a/src/snek/templates/about.html b/src/snek/templates/about.html index 0f1b8a9..e403458 100644 --- a/src/snek/templates/about.html +++ b/src/snek/templates/about.html @@ -3,5 +3,5 @@ {% block main %} - + {% endblock %} \ No newline at end of file