function fullscreen(){document.getElementById('frame').style.border="none";}
function resizeWindow(state){var button=document.getElementById('compact-window');if(state==true){button.setAttribute('onclick','resizeWindow(false)');button.setAttribute('class','fa fa-expand');button.setAttribute('title','Expand Window');ipcRenderer.send('exit-fullscreen');remote.getCurrentWindow().setSize(266,150);}else{button.setAttribute('onclick','resizeWindow(true)');button.setAttribute('class','fa fa-compress');button.setAttribute('title','Compact Window');ipcRenderer.send('exit-fullscreen');remote.getCurrentWindow().setSize(445,250);}}
function minimizeWindow(){ipcRenderer.send('minimize-main-window');}
function maximizeWindow(){ipcRenderer.send('maximize-main-window');hideDecoration();fullscreen();}
function aboutWindow(){ipcRenderer.send('create-about-window');}
function helpWindow(){ipcRenderer.send('create-help-window');}
function managePlaylistsWindow(){ipcRenderer.send('create-playlist-window');}
var titleBarAutoHide=(state)=>{var time;if(state==true){document.onmousemove=resetTimer;document.onkeypress=resetTimer;}
if(state==false){clearTimeout(time);document.onmousedown=showDecoration;document.onmousemove="";document.onkeypress=showDecoration;}
function resetTimer(){showDecoration();clearTimeout(time);time=setTimeout(hideDecoration,2000);}};document.addEventListener('dragover',function(event){event.preventDefault();return false;},false);document.addEventListener('drop',function(event){event.preventDefault();return false;},false);
