From ddde7d038b1dd4599d0a28e0521e0a9dc1efcd5a Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sun, 8 Jan 2023 15:06:01 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B8=20=D1=80=D0=B5=D0=B4=D0=B8=D1=80=D0=B5=D0=BA=D1=82=D0=B0?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=20url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/App.vue | 25 ++++++------------- .../CommonHelpPage/CommonHelpPage.vue | 2 +- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/client/components/App.vue b/client/components/App.vue index 5d8a4311..331af373 100644 --- a/client/components/App.vue +++ b/client/components/App.vue @@ -207,26 +207,15 @@ class App { return this.$store.state.config.mode; } - get isReaderActive() { - return (this.rootRoute == '/reader' || this.rootRoute == '/external-libs'); - } - redirectIfNeeded() { - if ((this.mode == 'reader' || this.mode == 'omnireader' || this.mode == 'liberama')) { - const search = window.location.search.substr(1); + const search = window.location.search.substr(1); - //распознавание параметра url вида "?url=" и редирект при необходимости - if (!this.isReaderActive) { - const s = search.split('url='); - const url = s[1] || ''; - const q = utils.parseQuery(s[0] || ''); - if (url) { - q.url = url; - } - - window.history.replaceState({}, '', '/'); - this.$router.replace({ path: '/reader', query: q }); - } + //распознавание параметра url вида "?url=" и редирект при необходимости + const s = search.split('url='); + const url = s[1] || ''; + if (url) { + window.history.replaceState({}, '', '/'); + this.$router.replace({ path: '/reader', query: {url} }); } } } diff --git a/client/components/Reader/HelpPage/CommonHelpPage/CommonHelpPage.vue b/client/components/Reader/HelpPage/CommonHelpPage/CommonHelpPage.vue index 4aebb906..bff9389a 100644 --- a/client/components/Reader/HelpPage/CommonHelpPage/CommonHelpPage.vue +++ b/client/components/Reader/HelpPage/CommonHelpPage/CommonHelpPage.vue @@ -59,7 +59,7 @@ class CommonHelpPage { } get bookmarkText() { - return `javascript:location.href='https://${window.location.host}/?url='+location.href;` + return `javascript:location.href='${window.location.protocol}//${window.location.host}/#/reader?url='+location.href;` } async copyText(text, mes) {