Updating tooltip information
This commit is contained in:
parent
39068091bc
commit
4d2e1493cf
|
@ -114,12 +114,12 @@
|
|||
<ul id="also"></ul>
|
||||
|
||||
<div id="button-grid">
|
||||
<button type="submit" id="save">
|
||||
<button type="submit" id="save" title="Save options">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"/><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"/><path d="M7 3v4a1 1 0 0 0 1 1h7"/></svg>
|
||||
<p>Save</p>
|
||||
</button>
|
||||
|
||||
<button type="button" id="restore">
|
||||
<button type="button" id="restore" title="Restore options from last save">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 14 4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"/></svg>
|
||||
<p>Restore</p>
|
||||
</button>
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue