diff --git a/.eslintignore b/.eslintignore index 2eac19d7..e6165a19 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ *.min.js built/ coverage/ +automated_screenshots/node_modules/ diff --git a/automated_screenshots/index.js b/automated_screenshots/index.js index b7c67b4b..6dbbd739 100644 --- a/automated_screenshots/index.js +++ b/automated_screenshots/index.js @@ -10,7 +10,10 @@ const config = { }; (async () => { - const files = await Filehound.create().ext("wsz").paths("skins/").find(); + const files = await Filehound.create() + .ext("wsz") + .paths("skins/") + .find(); const browser = await puppeteer.launch(); diff --git a/css/context-menu.css b/css/context-menu.css index d7b1b2ae..4d153dea 100644 --- a/css/context-menu.css +++ b/css/context-menu.css @@ -19,22 +19,23 @@ display: block; } -#winamp2-js #context-menu, #winamp2-js #context-menu ul { +#winamp2-js #context-menu, +#winamp2-js #context-menu ul { display: none; z-index: 50; /* Gross */ - background-color: #FFFFFF; + background-color: #ffffff; position: absolute; list-style: none; padding: 0; margin: 0; - border: 1px solid #A7A394; + border: 1px solid #a7a394; cursor: default; - box-shadow: 2px 2px 4px rgba(0, 0, 0, .5); + box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); } #winamp2-js #context-menu li { position: relative; - font-family: 'Tahoma'; + font-family: "Tahoma"; font-size: 11px; color: black; white-space: nowrap; @@ -52,9 +53,10 @@ cursor: default; } -#winamp2-js #context-menu li:hover, #winamp2-js #context-menu li:hover a { - background-color: #224EB7; - color: #FFFFFF; +#winamp2-js #context-menu li:hover, +#winamp2-js #context-menu li:hover a { + background-color: #224eb7; + color: #ffffff; } #winamp2-js #context-menu li.hr { @@ -62,13 +64,13 @@ } #winamp2-js #context-menu li.hr:hover { - background-color: #FFFFFF; + background-color: #ffffff; } #winamp2-js #context-menu li.hr hr { border: none; height: 1px; - background-color: #A7A394; + background-color: #a7a394; margin: 0; padding: 0; } diff --git a/css/equalizer-window.css b/css/equalizer-window.css index 8d99e0cc..2893a712 100644 --- a/css/equalizer-window.css +++ b/css/equalizer-window.css @@ -15,29 +15,29 @@ height: 6px; width: 97px; background-position: 0 0; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-volume::-webkit-slider-thumb { height: 7px; width: 2px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-volume::-moz-range-thumb { height: 7px; width: 2px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-volume.center::-webkit-slider-thumb { width: 5px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-volume.center::-moz-range-thumb { width: 5px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-balance { @@ -47,29 +47,29 @@ height: 6px; width: 43px; background-position: 0 0; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-balance::-webkit-slider-thumb { height: 7px; width: 2px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-balance::-moz-range-thumb { height: 7px; width: 2px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-balance.center::-webkit-slider-thumb { width: 5px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #equalizer-balance.center::-moz-range-thumb { width: 5px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js .equalizer-top { @@ -84,7 +84,7 @@ width: 9px; left: 264px; top: 3px; - cursor: url('../cursors/MAINMENU.PNG'), auto; + cursor: url("../cursors/MAINMENU.PNG"), auto; } #winamp2-js #equalizer-shade { @@ -93,7 +93,7 @@ width: 9px; left: 254px; top: 3px; - cursor: url('../cursors/MAINMENU.PNG'), auto; + cursor: url("../cursors/MAINMENU.PNG"), auto; } #winamp2-js #on { @@ -227,7 +227,7 @@ height: 51px; width: 14px; margin-top: 6px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js .band .rc-slider .rc-slider-handle { @@ -235,5 +235,5 @@ height: 11px; margin: -6px 0 0 1px; position: absolute; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } diff --git a/css/main-window.css b/css/main-window.css index b149d385..8fc65815 100755 --- a/css/main-window.css +++ b/css/main-window.css @@ -3,7 +3,7 @@ position: absolute; height: 116px; width: 275px; - cursor: url('../cursors/MAINMENU.PNG'), auto; + cursor: url("../cursors/MAINMENU.PNG"), auto; /* Ask the browser to scale showing large pixels if possible */ image-rendering: -moz-crisp-edges; /* Firefox */ image-rendering: -o-crisp-edges; /* Opera */ @@ -13,15 +13,15 @@ } #winamp2-js #main-window.doubled #context-menu { - -moz-transform: scale(.5); + -moz-transform: scale(0.5); -moz-transform-origin: top left; - -webkit-transform: scale(.5); + -webkit-transform: scale(0.5); -webkit-transform-origin: top left; } #winamp2-js #main-window.loading { background-image: none; - background-color: #FFFFFF; + background-color: #ffffff; border: 2px solid #dddddd; } @@ -45,8 +45,8 @@ } #winamp2-js #loading .ellipsis-anim span:nth-child(1) { - -webkit-animation-delay: 0.0s; - animation-delay: 0.0s; + -webkit-animation-delay: 0s; + animation-delay: 0s; } #winamp2-js #loading .ellipsis-anim span:nth-child(2) { @@ -93,7 +93,7 @@ left: 0; height: 14px; width: 275px; - cursor: url('../cursors/TITLEBAR.PNG'), auto; + cursor: url("../cursors/TITLEBAR.PNG"), auto; } #winamp2-js #option, @@ -104,7 +104,7 @@ height: 9px; width: 9px; top: 3px; - cursor: url('../cursors/MAINMENU.PNG'), auto; + cursor: url("../cursors/MAINMENU.PNG"), auto; } #winamp2-js #title-bar #option { @@ -118,7 +118,7 @@ } #winamp2-js #title-bar #close { left: 264px; - cursor: url('../cursors/CLOSE.PNG'), auto; + cursor: url("../cursors/CLOSE.PNG"), auto; } #winamp2-js #clutter-bar { position: absolute; @@ -301,19 +301,19 @@ height: 13px; width: 68px; background-position: 0 0; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #volume::-webkit-slider-thumb { top: 1px; height: 11px; width: 14px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #volume::-moz-range-thumb { top: 1px; height: 11px; width: 14px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #balance { @@ -323,20 +323,20 @@ height: 13px; width: 38px; background-position: 0 0; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #balance::-webkit-slider-thumb { top: 1px; height: 11px; width: 14px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #balance::-moz-range-thumb { top: 1px; height: 11px; width: 14px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js .windows { @@ -367,13 +367,13 @@ top: 72px; width: 248px; height: 10px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } #winamp2-js #position::-webkit-slider-thumb { height: 10px; width: 29px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; /* * Fix the strange bug in Safair/mobile-chrome * http://stackoverflow.com/questions/26727769/rendering-glitch-when-manipulating-range-input-value-via-javascript-in-webkit @@ -385,7 +385,7 @@ #winamp2-js #position::-moz-range-thumb { height: 10px; width: 29px; - cursor: url('../cursors/POSBAR.PNG'), auto; + cursor: url("../cursors/POSBAR.PNG"), auto; } /* For some reason, we can't use display: none here */ @@ -483,7 +483,7 @@ } #winamp2-js #shade-time { - cursor: url('../cursors/MAINMENU.PNG'), auto; + cursor: url("../cursors/MAINMENU.PNG"), auto; } #winamp2-js .shade .media-info, @@ -495,7 +495,7 @@ display: none; } #winamp2-js .shade #title-bar { - cursor: url('../cursors/MAINMENU.PNG'), auto; + cursor: url("../cursors/MAINMENU.PNG"), auto; } #winamp2-js .shade .actions div { @@ -509,35 +509,40 @@ top: 2px; left: 169px; } -#winamp2-js .shade .actions #play, #winamp2-js .shade .actions #play:active { +#winamp2-js .shade .actions #play, +#winamp2-js .shade .actions #play:active { background: none; height: 10px; width: 10px; top: 2px; left: 176px; } -#winamp2-js .shade .actions #pause, #winamp2-js .shade .actions #pause:active { +#winamp2-js .shade .actions #pause, +#winamp2-js .shade .actions #pause:active { background: none; height: 10px; width: 9px; top: 2px; left: 186px; } -#winamp2-js .shade .actions #stop, #winamp2-js .shade .actions #stop:active { +#winamp2-js .shade .actions #stop, +#winamp2-js .shade .actions #stop:active { background: none; height: 10px; width: 9px; top: 2px; left: 195px; } -#winamp2-js .shade .actions #next, #winamp2-js .shade .actions #next:active { +#winamp2-js .shade .actions #next, +#winamp2-js .shade .actions #next:active { background: none; height: 10px; width: 10px; top: 2px; left: 204px; } -#winamp2-js .shade #eject, #winamp2-js .shade #eject:active { +#winamp2-js .shade #eject, +#winamp2-js .shade #eject:active { height: 10px; width: 10px; top: 2px; diff --git a/css/page.css b/css/page.css index b0ff93c8..8c282089 100644 --- a/css/page.css +++ b/css/page.css @@ -1,6 +1,6 @@ /* Rules for the page layout */ body { - background-color: #224EB7; + background-color: #224eb7; font-family: arial; font-size: 15px; } diff --git a/css/winamp.css b/css/winamp.css index b43bb751..96b02f04 100644 --- a/css/winamp.css +++ b/css/winamp.css @@ -1,32 +1,32 @@ /* Rules used by all windows */ /* Range input css reset */ -#winamp2-js input[type=range] { +#winamp2-js input[type="range"] { -webkit-appearance: none; margin: 0; padding: 0; background: none; border: none; } -#winamp2-js input[type=range]::-webkit-slider-thumb { +#winamp2-js input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; border: none; border-radius: 0; background: none; } -#winamp2-js input[type=range]::-moz-range-thumb { +#winamp2-js input[type="range"]::-moz-range-thumb { border: none; border-radius: 0; background: none; } -#winamp2-js input[type=range]::-moz-range-track { +#winamp2-js input[type="range"]::-moz-range-track { border: none; background: none; } -#winamp2-js input[type=range]:focus { +#winamp2-js input[type="range"]:focus { outline: none; } -#winamp2-js input[type=range]::-moz-focus-outer { +#winamp2-js input[type="range"]::-moz-focus-outer { border: 0; } @@ -37,24 +37,24 @@ /* Animation */ @keyframes blink { 0% { - opacity: 1.0; + opacity: 1; } 50% { - opacity: 0.0; + opacity: 0; } 100% { - opacity: 1.0; + opacity: 1; } } @-webkit-keyframes blink { 0% { - opacity: 1.0; + opacity: 1; } 50% { - opacity: 0.0; + opacity: 0; } 100% { - opacity: 1.0; + opacity: 1; } } @@ -69,7 +69,7 @@ #winamp2-js .window { position: absolute; - cursor: url('../cursors/MAINMENU.PNG'), auto; + cursor: url("../cursors/MAINMENU.PNG"), auto; /* Ask the browser to scale showing large pixels if possible */ image-rendering: -moz-crisp-edges; /* Firefox */ image-rendering: -o-crisp-edges; /* Opera */ diff --git a/js/components/App.js b/js/components/App.js index 8400c6a1..e3b582ab 100644 --- a/js/components/App.js +++ b/js/components/App.js @@ -8,23 +8,27 @@ import Skin from "./Skin"; import { equalizerEnabled, playlistEnabled } from "../config"; const App = ({ winamp, loading }) => - loading - ?