/** *Created by PanJiaChen on 16/11/29. * @param {Sting} url * @param {Sting} title * @param {Number} w * @param {Number} h */exportdefaultfunctionopenWindow(url,title,w,h){// Fixes dual-screen position Most browsers FirefoxconstdualScreenLeft=window.screenLeft!==undefined?window.screenLeft:screen.leftconstdualScreenTop=window.screenTop!==undefined?window.screenTop:screen.topconstwidth=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.widthconstheight=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.heightconstleft=((width/2)-(w/2))+dualScreenLeftconsttop=((height/2)-(h/2))+dualScreenTopconstnewWindow=window.open(url,title,'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left)// Puts focus on the newWindowif(window.focus){newWindow.focus()}}