feat(popup): set switch checked by default
This commit is contained in:
parent
c514b67cd9
commit
268c671df3
@ -36,7 +36,7 @@
|
||||
<label class="switch-label">
|
||||
<span>Hide irritating dialogs on <strong id="host"></strong></span>
|
||||
<div class="switch">
|
||||
<input id="power" type="checkbox" />
|
||||
<input checked="checked" id="power" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</div>
|
||||
</label>
|
||||
|
@ -153,7 +153,7 @@ const handleContentLoaded = async () => {
|
||||
unlike.addEventListener("click", handleRate);
|
||||
|
||||
if (tab.location) host.innerText = tab.location.hostname.replace("www.", "");
|
||||
if (state.enabled) power.setAttribute("checked", "checked");
|
||||
if (!state.enabled) power.removeAttribute("checked");
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user