From 4d2e1493cfde17fc90457eec9525f731c56a2da7 Mon Sep 17 00:00:00 2001 From: Jean Date: Sat, 25 Jan 2025 01:46:08 -0800 Subject: [PATCH] Updating tooltip information --- src/popup.html | 4 ++-- src/popup.js | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/popup.html b/src/popup.html index 11c1512..ab70914 100644 --- a/src/popup.html +++ b/src/popup.html @@ -114,12 +114,12 @@
- - diff --git a/src/popup.js b/src/popup.js index 5ae2eca..a9198a9 100644 --- a/src/popup.js +++ b/src/popup.js @@ -54,8 +54,15 @@ function toggle() { function toggleButton() { document.querySelector("#toggle").classList.toggle("is-on"); let state = document.querySelector("#state"); + let button = document.querySelector("#toggle"); state.classList.toggle("is-on"); - state.innerHTML == "disabled" ? state.innerHTML = "enabled" : state.innerHTML = "disabled"; + if (state.innerHTML == "disabled") { + state.innerHTML = "enabled" + button.title = "Toggle to disable"; + } else { + state.innerHTML = "disabled"; + button.title = "Toggle to enable"; + } } /* Gets saved options and loads them */