Clean up main-window.js before final refactor (#169)

This commit is contained in:
Jordan Eldredge 2016-07-28 09:20:54 -07:00 committed by GitHub
parent 75a4cd1696
commit 3d767ab054

View file

@ -1,24 +1,15 @@
module.exports = {
init: function(winamp) {
this.winamp = winamp;
this.nodes = {
visualizer: document.getElementById('visualizer'),
workIndicator: document.getElementById('work-indicator'),
window: document.getElementById('main-window')
};
this.handle = document.getElementById('title-bar');
this.body = this.nodes.window;
this._registerListeners();
return this;
},
_registerListeners: function() {
var self = this;
this.nodes.visualizer.onclick = function() {
self.winamp.toggleVisualizer();
document.getElementById('visualizer').onclick = function() {
winamp.toggleVisualizer();
};
return this;
}
};