1# vim:fileencoding=utf-8 2# License: GPL v3 Copyright: 2015, Kovid Goyal <kovid at kovidgoyal.net> 3from __python__ import hash_literals 4 5session_data = None 6 7def set_session_data(sd): 8 nonlocal session_data 9 session_data = sd 10 return session_data 11 12def get_session_data(): 13 return session_data 14 15def main_js(newval): 16 if newval is not undefined: 17 main_js.ans = newval 18 return main_js.ans 19 20def get_current_query(newval): 21 if newval: 22 get_current_query.ans = newval 23 return get_current_query.ans 24 25 26def get_db(db): 27 if db: 28 get_db.db = db 29 return get_db.db 30 31 32def get_translations(val): 33 if val: 34 get_translations.ans = val 35 return get_translations.ans 36