21 lines
657 B
JavaScript
21 lines
657 B
JavaScript
/* 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, i18n */
|
|
|
|
"use strict";
|
|
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
const logoutButton = document.getElementById("logout-button");
|
|
const logoutUrl = document.body.dataset.webhome + "login?lang=" + i18n.lang;
|
|
|
|
logoutButton?.addEventListener("click", event => {
|
|
event.preventDefault();
|
|
utils.doLogout(logoutUrl);
|
|
});
|
|
});
|