Skip to content

Commit 104d489

Browse files
committed
[popup] Don't show slider animation when popup is opened
1 parent ad37b7b commit 104d489

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

app/pages/popup.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<form>
1212
<label class="switch">
1313
<input id="ghonoff" name="ghonoff" type="checkbox">
14-
<span class="slider round"></span>
14+
<span id="slider" class="slider notransition round"></span>
1515
</label>
1616
<button id="settings">Settings</button>
1717
</form>

app/scripts/popup.js

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ function toggleOnOff(e) {
3030
browser.browserAction.setIcon({ path: icon });
3131
});
3232
});
33+
document.querySelector("#slider").classList.remove("notransition");
3334
}
3435

3536
function onOpened() {

app/styles/popup.css

+8
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ button {
2929
height: 0;
3030
}
3131

32+
.notransition:before {
33+
-webkit-transition: none !important;
34+
-moz-transition: none !important;
35+
-o-transition: none !important;
36+
-ms-transition: none !important;
37+
transition: none !important;
38+
}
39+
3240
.slider {
3341
position: absolute;
3442
cursor: pointer;

0 commit comments

Comments
 (0)