mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
8234dc5436
commit
c4295355a2
19
src/pyj/viewer/router.pyj
Normal file
19
src/pyj/viewer/router.pyj
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# vim:fileencoding=utf-8
|
||||||
|
# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
|
||||||
|
from __python__ import bound_methods, hash_literals
|
||||||
|
|
||||||
|
from modals import close_all_modals
|
||||||
|
from utils import parse_url_params
|
||||||
|
|
||||||
|
|
||||||
|
def get_current_query(newval):
|
||||||
|
if newval:
|
||||||
|
get_current_query.ans = newval
|
||||||
|
return get_current_query.ans or {}
|
||||||
|
|
||||||
|
|
||||||
|
def apply_url():
|
||||||
|
close_all_modals() # needed to close any error dialogs, etc when clicking back or forward in the browser or using push_state() to go to a new page
|
||||||
|
data = parse_url_params()
|
||||||
|
data.mode = data.mode or 'read_book'
|
||||||
|
get_current_query.ans = data
|
Loading…
x
Reference in New Issue
Block a user