mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-24 02:36:00 +00:00
27 lines
977 B
JavaScript
27 lines
977 B
JavaScript
Context = {
|
|
init: function(winamp) {
|
|
document.onclick = function() {
|
|
winamp.closeOptionMenu();
|
|
}
|
|
|
|
var skinSelectNodes = document.getElementsByClassName('skin-select');
|
|
for(var i = 0; i < skinSelectNodes.length; i++) {
|
|
skinSelectNodes[i].onclick = function() {
|
|
winamp.setSkinByUrl(this.dataset.skinUrl);
|
|
}
|
|
}
|
|
document.getElementById('context-play-file').onclick = function(event) {
|
|
winamp.openFileDialog();
|
|
// Makes the option menu close. Not 100% sure why
|
|
event.stopPropagation();
|
|
};
|
|
document.getElementById('context-load-skin').onclick = function(event) {
|
|
winamp.openFileDialog();
|
|
// Makes the option menu close. Not 100% sure why
|
|
event.stopPropagation();
|
|
};
|
|
document.getElementById('context-exit').onclick = function() {
|
|
winamp.close();
|
|
};
|
|
}
|
|
}
|