mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-22 17:47:16 +00:00
Swith to pure CSS solution to blinking time
This commit is contained in:
parent
e2be096441
commit
fc2ce55dac
2 changed files with 8 additions and 19 deletions
12
winamp.css
12
winamp.css
|
|
@ -12,10 +12,6 @@ a:focus { outline: none; }
|
|||
}
|
||||
|
||||
/* Animation */
|
||||
.blink {
|
||||
animation: blink 2s step-start 1s infinite;
|
||||
-webkit-animation: blink 2s step-start 1s infinite;
|
||||
}
|
||||
@keyframes blink {
|
||||
0% { opacity: 1.0; }
|
||||
50% { opacity: 0.0; }
|
||||
|
|
@ -159,6 +155,10 @@ a:focus { outline: none; }
|
|||
}
|
||||
|
||||
.stop .status #time { display:none; }
|
||||
.pause .status #time {
|
||||
animation: blink 2s step-start 1s infinite;
|
||||
-webkit-animation: blink 2s step-start 1s infinite;
|
||||
}
|
||||
|
||||
.status #time #minus-sign {
|
||||
position: absolute;
|
||||
|
|
@ -651,6 +651,10 @@ a:focus { outline: none; }
|
|||
}
|
||||
|
||||
.stop.shade #shade-time { display:none; }
|
||||
.pause.shade #shade-time {
|
||||
animation: blink 2s step-start 1s infinite;
|
||||
-webkit-animation: blink 2s step-start 1s infinite;
|
||||
}
|
||||
|
||||
.shade #shade-time .character {
|
||||
position: absolute;
|
||||
|
|
|
|||
15
winamp.js
15
winamp.js
|
|
@ -185,7 +185,6 @@ function Winamp () {
|
|||
});
|
||||
|
||||
this.media.addEventListener('ended', function() {
|
||||
self.stopBlinkTime();
|
||||
self.setStatus('stop');
|
||||
});
|
||||
|
||||
|
|
@ -195,7 +194,6 @@ function Winamp () {
|
|||
|
||||
this.media.addEventListener('playing', function() {
|
||||
self.nodes.workIndicator.classList.remove('selected');
|
||||
self.stopBlinkTime();
|
||||
});
|
||||
|
||||
this.nodes.shade.onclick = function() {
|
||||
|
|
@ -217,7 +215,6 @@ function Winamp () {
|
|||
}
|
||||
|
||||
this.nodes.play.onclick = function() {
|
||||
self.stopBlinkTime();
|
||||
self.media.play();
|
||||
self.setStatus('play');
|
||||
}
|
||||
|
|
@ -225,13 +222,11 @@ function Winamp () {
|
|||
this.nodes.pause.onclick = function() {
|
||||
self.media.pause();
|
||||
self.setStatus('pause');
|
||||
self.startBlinkTime();
|
||||
}
|
||||
|
||||
this.nodes.stop.onclick = function() {
|
||||
self.media.stop();
|
||||
self.setStatus('stop');
|
||||
self.stopBlinkTime();
|
||||
}
|
||||
|
||||
this.nodes.next.onclick = function() {
|
||||
|
|
@ -290,16 +285,6 @@ function Winamp () {
|
|||
}
|
||||
|
||||
/* Functions */
|
||||
this.startBlinkTime = function(){
|
||||
self.nodes.time.classList.add('blink');
|
||||
self.nodes.shadeTime.classList.add('blink');
|
||||
}
|
||||
this.stopBlinkTime = function(){
|
||||
self.nodes.time.classList.remove('blink');
|
||||
self.nodes.shadeTime.classList.remove('blink');
|
||||
}
|
||||
|
||||
|
||||
this.setStatus = function(className) {
|
||||
var statusOptions = ['play', 'stop', 'pause'];
|
||||
for(var i = 0; i < statusOptions.length; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue