From 67f6cd6ce0ba7341649dff308e68440323814eed Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 15 Oct 2017 17:07:17 +0530 Subject: [PATCH] Refactor iframe control logic into its own class Allows it to be re-used for the popup iframe --- src/pyj/read_book/comm.pyj | 144 ++++++++++++++++++++++++++++ src/pyj/read_book/content_popup.pyj | 5 +- src/pyj/read_book/globals.pyj | 20 +--- src/pyj/read_book/iframe.pyj | 7 +- src/pyj/read_book/view.pyj | 140 ++++++--------------------- 5 files changed, 182 insertions(+), 134 deletions(-) create mode 100644 src/pyj/read_book/comm.pyj diff --git a/src/pyj/read_book/comm.pyj b/src/pyj/read_book/comm.pyj new file mode 100644 index 0000000000..7da6c4731b --- /dev/null +++ b/src/pyj/read_book/comm.pyj @@ -0,0 +1,144 @@ +# vim:fileencoding=utf-8 +# License: GPL v3 Copyright: 2017, Kovid Goyal +from __python__ import bound_methods, hash_literals + +from aes import GCM + +from book_list.globals import main_js, get_translations +from book_list.theme import get_font_family +from dom import ensure_id + + +LOADING_DOC = ''' + + + + + +