commit 3df86939bc3afabc20c0c45120084ad9f2cc0ce4
parent 7294218b1d61c66cc7d45c57a8e70658c0fcc2c2
Author: Sergey Orlov <wladimirych@gmail.com>
Date: Sun, 14 Jun 2020 22:01:44 +0200
Revert c3671ecb, 7d9f8619
Remove logging for window.open
Diffstat:
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/src/lib/popup-window/index.js b/src/lib/popup-window/index.js
@@ -1,5 +1,3 @@
-import logging from '~/lib/logging';
-
function openPopupWindow(url, width, uniqName = null) {
var left, top, height,
screenLeft = screen.availLeft || 0,
@@ -21,20 +19,8 @@ function openPopupWindow(url, width, uniqName = null) {
height = window.innerHeight;
var features = 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top;
features += ',resizable,scrollbars';
- const eventId = logging.randId();
- url = `https://nakarte.me/r/?url=${encodeURIComponent(url)}&event=${eventId}`;
- let error;
- let isClosed;
- let win;
- try {
- win = window.open(url, uniqName, features);
- } catch (e) {
- error = e;
- }
- if (win) {
- isClosed = win.closed;
- }
- logging.logEvent('openPopupWindow', {win: Boolean(win), error, isClosed, eventId});
+ window.open(url, uniqName, features)
+ .focus();
}
export {openPopupWindow};