2022-10-25 14:26:44 +03:00
|
|
|
/**
|
2021-12-07 13:17:20 +03:00
|
|
|
* Listener for theme mode toggle
|
2021-12-01 14:51:25 +03:00
|
|
|
*/
|
2022-10-25 14:26:44 +03:00
|
|
|
$(function () {
|
2023-02-14 23:53:40 +03:00
|
|
|
$(".mode-toggle").on('click',(e) => {
|
2022-10-25 14:26:44 +03:00
|
|
|
const $target = $(e.target);
|
|
|
|
let $btn = ($target.prop("tagName") === "button".toUpperCase() ?
|
|
|
|
$target : $target.parent());
|
2021-12-07 13:17:20 +03:00
|
|
|
|
2023-02-14 23:53:40 +03:00
|
|
|
$btn.trigger('blur'); // remove the clicking outline
|
2022-10-25 14:26:44 +03:00
|
|
|
flipMode();
|
|
|
|
});
|
2021-12-01 14:51:25 +03:00
|
|
|
});
|