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) {