2019-09-23 02:25:02 -05:00
|
|
|
/////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
|
|
//
|
2020-01-02 08:43:50 -06:00
|
|
|
// Copyright (C) 2013 - 2020, The pgAdmin Development Team
|
2019-09-23 02:25:02 -05:00
|
|
|
// This software is released under the PostgreSQL Licence
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
let pgWindow = function() {
|
|
|
|
let pgWindow = null;
|
|
|
|
try {
|
|
|
|
if(window.opener && window.opener.pgAdmin) {
|
|
|
|
pgWindow = window.opener;
|
|
|
|
} else if(window.parent && window.parent.pgAdmin){
|
|
|
|
pgWindow = window.parent;
|
|
|
|
} else if(window.top && window.top.pgAdmin){
|
|
|
|
pgWindow = window.top;
|
|
|
|
} else {
|
|
|
|
pgWindow = window;
|
|
|
|
}
|
|
|
|
} catch (error) {
|
|
|
|
pgWindow = window;
|
|
|
|
}
|
|
|
|
return pgWindow;
|
|
|
|
}();
|
|
|
|
|
|
|
|
export default pgWindow;
|