Created
December 17, 2019 05:00
-
-
Save naupaw/1c4da6d02e0e6452ef53ad9126a55d83 to your computer and use it in GitHub Desktop.
Revisions
-
pedox created this gist
Dec 17, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ export default (url, width, height) => { const h = width || 600 const w = height || 800 const y = window.top.outerHeight / 2 + window.top.screenY - h / 2 const x = window.top.outerWidth / 2 + window.top.screenX - w / 2 window.open( url, '_blank', 'toolbar=no,scrollbars=yes,resizable=yes,top=' + y + ',left=' + x + ',width=' + w + ',height=' + h ) }