From da6fed80d1ec653e78f1aaf163ffe81d815b2b3e Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Tue, 27 Oct 2020 23:02:28 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=B0=D0=B4=20LibsPage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Reader/LibsPage/LibsPage.vue | 33 ++----------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/client/components/Reader/LibsPage/LibsPage.vue b/client/components/Reader/LibsPage/LibsPage.vue index a1fb934c..b0732ea2 100644 --- a/client/components/Reader/LibsPage/LibsPage.vue +++ b/client/components/Reader/LibsPage/LibsPage.vue @@ -1,7 +1,7 @@ - Открыть + Открыть Открыть в читалке @@ -53,34 +53,6 @@ import _ from 'lodash'; import Window from '../../share/Window.vue'; //import rstore from '../../../store/modules/reader'; -const popupCenter = ({url, title, w, h}) => { - // Fixes dual-screen position Most browsers Firefox - const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX; - const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY; - - const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; - const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; - - const systemZoom = width / window.screen.availWidth; - const left = (width - w) / 2 / systemZoom + dualScreenLeft - const top = (height - h) / 2 / systemZoom + dualScreenTop - const newWindow = window.open(url, title, - ` - scrollbars=yes, - location=no, - toolbar=yes, - menubar=no, - width=${w / systemZoom}, - height=${h / systemZoom}, - top=${top}, - left=${left} - ` - ) - - if (window.focus) newWindow.focus(); - //newWindow.close(); -} - export default @Component({ components: { Window @@ -181,7 +153,6 @@ class LibsPage extends Vue { this.$nextTick(() => { this.frameVisible = true; }); - popupCenter({url: this.libs.startLink, w: 900, h: 500}); } addProtocol(url) {