From bb48c7901283f027c20f3802bda14cdcd7cfa1fd Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 13 Jan 2015 21:25:44 -0800 Subject: [PATCH] Cleanup and renaming --- css/winamp.css | 14 +++++++------- index.html | 2 +- js/main-window.js | 6 +++--- js/skin.js | 2 +- js/winamp.js | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/css/winamp.css b/css/winamp.css index 80061d00..d1ad6d7a 100755 --- a/css/winamp.css +++ b/css/winamp.css @@ -30,7 +30,7 @@ body { } /* Styles */ -#winamp { +#main-window { position: absolute; /* background-image: MAIN.BMP via Javascript */ height: 116px; @@ -48,7 +48,7 @@ body { -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */ } -#winamp.doubled { +#main-window.doubled { -moz-transform: scale(2); -moz-transform-origin: top left; -webkit-transform: scale(2); @@ -62,13 +62,13 @@ body { -webkit-transform-origin: top left; } -#winamp.loading { +#main-window.loading { background-image: none; background-color: #FFFFFF; border: 2px solid #dddddd; } /* Hide everything whil we are loading */ -#winamp.loading * { +#main-window.loading * { display: none; } @@ -83,11 +83,11 @@ body { } /* Only show loading div while we are loading */ -#winamp.loading #loading { +#main-window.loading #loading { display: block; } -#winamp.closed { display: none; } +#main-window.closed { display: none; } #title-bar { position: absolute; @@ -680,7 +680,7 @@ body { } /* Shade View */ -#winamp.shade { +#main-window.shade { height: 14px; } diff --git a/index.html b/index.html index e67cc488..ba9b37a4 100755 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@ -
+
Loading...
diff --git a/js/main-window.js b/js/main-window.js index 6d190038..e147bc46 100644 --- a/js/main-window.js +++ b/js/main-window.js @@ -12,6 +12,7 @@ MainWindow = { 'songTitle': document.getElementById('song-title'), 'time': document.getElementById('time'), 'shadeTime': document.getElementById('shade-time'), + 'shadeMinusSign': document.getElementById('shade-minus-sign'), 'visualizer': document.getElementById('visualizer'), 'previous': document.getElementById('previous'), 'play': document.getElementById('play'), @@ -29,7 +30,7 @@ MainWindow = { 'balance': document.getElementById('balance'), 'workIndicator': document.getElementById('work-indicator'), 'titleBar': document.getElementById('title-bar'), - 'window': document.getElementById('winamp'), + 'window': document.getElementById('main-window'), }; this.handle = document.getElementById('title-bar'); @@ -221,7 +222,6 @@ MainWindow = { } }, - // TODO: Refactor this function updateTime: function() { this.updateShadePositionClass(); @@ -232,7 +232,7 @@ MainWindow = { } else { digits = this.winamp._timeObject(this.winamp.getTimeElapsed()); } - this.winamp.skin.font.displayCharacterInNode(shadeMinusCharacter, document.getElementById('shade-minus-sign')); + this.winamp.skin.font.displayCharacterInNode(shadeMinusCharacter, this.nodes.shadeMinusSign); var digitNodes = [ document.getElementById('minute-first-digit'), diff --git a/js/skin.js b/js/skin.js index 971dc766..18a24f00 100644 --- a/js/skin.js +++ b/js/skin.js @@ -9,7 +9,7 @@ SkinManager = { }, _skinImages: { - "#winamp": "MAIN.BMP", + "#main-window": "MAIN.BMP", "#title-bar": "TITLEBAR.BMP", "#title-bar #option": "TITLEBAR.BMP", "#title-bar #minimize": "TITLEBAR.BMP", diff --git a/js/winamp.js b/js/winamp.js index 6659cb9c..7a9c0dfb 100755 --- a/js/winamp.js +++ b/js/winamp.js @@ -156,7 +156,7 @@ Winamp = { seekForwardBy: function(seconds) { this.media.seekToTime(this.media.timeElapsed() + seconds); - winamp.mainWindow.updateTime() + this.mainWindow.updateTime() }, toggleRepeat: function() {