Skip to content

Commit

Permalink
[popup] Don't show slider animation when popup is opened
Browse files Browse the repository at this point in the history
  • Loading branch information
fapdash committed Dec 20, 2021
1 parent ad37b7b commit 104d489
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/pages/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<form>
<label class="switch">
<input id="ghonoff" name="ghonoff" type="checkbox">
<span class="slider round"></span>
<span id="slider" class="slider notransition round"></span>
</label>
<button id="settings">Settings</button>
</form>
Expand Down
1 change: 1 addition & 0 deletions app/scripts/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function toggleOnOff(e) {
browser.browserAction.setIcon({ path: icon });
});
});
document.querySelector("#slider").classList.remove("notransition");
}

function onOpened() {
Expand Down
8 changes: 8 additions & 0 deletions app/styles/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ button {
height: 0;
}

.notransition:before {
-webkit-transition: none !important;
-moz-transition: none !important;
-o-transition: none !important;
-ms-transition: none !important;
transition: none !important;
}

.slider {
position: absolute;
cursor: pointer;
Expand Down

0 comments on commit 104d489

Please sign in to comment.