Добавил allowUrlParamBookPos

This commit is contained in:
Book Pauk
2019-01-24 01:29:45 +07:00
parent 2e469bd267
commit 3ccfec1baa

View File

@@ -97,6 +97,7 @@ class Reader extends Vue {
loaderActive = false;
progressActive = false;
bookPos = null;
allowUrlParamBookPos = true;
created() {
this.commit = this.$store.commit;
@@ -136,11 +137,12 @@ class Reader extends Vue {
}
updateRoute(isNewRoute) {
const pos = (this.bookPos != undefined ? `__p=${this.bookPos}&` : '');
const pos = (this.bookPos != undefined && this.allowUrlParamBookPos ? `__p=${this.bookPos}&` : '');
if (isNewRoute)
this.$router.push(`/reader?${pos}url=${this.lastOpenedBook.url}`);
else
this.$router.replace(`/reader?${pos}url=${this.lastOpenedBook.url}`);
}
get routeParamUrl() {