webamp/js/main-window.js
2016-07-28 08:33:48 -07:00

24 lines
577 B
JavaScript

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();
};
}
};