diff --git a/scripts/pi-hole/js/logout.js b/scripts/pi-hole/js/logout.js new file mode 100644 index 00000000..40f290ff --- /dev/null +++ b/scripts/pi-hole/js/logout.js @@ -0,0 +1,15 @@ +/* Pi-hole: A black hole for Internet advertisements + * (c) 2023 Pi-hole, LLC (https://pi-hole.net) + * Network-wide ad blocking via your own hardware. + * + * This file is copyright under the latest version of the EUPL. + * Please see LICENSE file for your rights under this license. */ + +/* global utils:false */ + +document.addEventListener("DOMContentLoaded", () => { + const logoutButton = document.getElementById("logout-button"); + logoutButton.addEventListener("click", () => { + utils.doLogout(); + }); +}); diff --git a/scripts/pi-hole/lua/header_authenticated.lp b/scripts/pi-hole/lua/header_authenticated.lp index f4a297f4..d27b80a2 100644 --- a/scripts/pi-hole/lua/header_authenticated.lp +++ b/scripts/pi-hole/lua/header_authenticated.lp @@ -9,6 +9,7 @@ ]]-- mg.include('header.lp','r') ?> + @@ -85,7 +86,7 @@ mg.include('header.lp','r') GitHub Pi-hole Releases - Log out + Log out