From 3eb93282f6aa750746980d77285f03b88e9e8ea2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 6 Jan 2012 14:35:29 +0530 Subject: [PATCH] ... --- .../ebooks/oeb/display/test-cfi/cfi-test.coffee | 6 +++--- .../ebooks/oeb/display/test-cfi/index.html | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/calibre/ebooks/oeb/display/test-cfi/cfi-test.coffee b/src/calibre/ebooks/oeb/display/test-cfi/cfi-test.coffee index 3a91600045..5b71acbe0c 100644 --- a/src/calibre/ebooks/oeb/display/test-cfi/cfi-test.coffee +++ b/src/calibre/ebooks/oeb/display/test-cfi/cfi-test.coffee @@ -47,7 +47,6 @@ mark_and_reload = (evt) -> ypos = window_ypos() newloc = window.location.href.replace(/#.*$/, '') + "#" + ypos + epubcfi window.location.replace(newloc) - document.getElementById('current-cfi').innerHTML = window.current_cfi window.location.reload() setTimeout(fn, 1) @@ -64,10 +63,11 @@ window.onload = -> if r window.current_cfi = r[2] ypos = if r[1] then 0+r[1] else 0 - document.getElementById('current-cfi').innerHTML = window.current_cfi + base = document.getElementById('first-h1').innerHTML + document.title = base + ": " + window.current_cfi fn = () -> - show_cfi() window_ypos(ypos) + setTimeout(show_cfi, 1) setTimeout(fn, 100) null diff --git a/src/calibre/ebooks/oeb/display/test-cfi/index.html b/src/calibre/ebooks/oeb/display/test-cfi/index.html index eb1429d196..0ff6e3ef2f 100644 --- a/src/calibre/ebooks/oeb/display/test-cfi/index.html +++ b/src/calibre/ebooks/oeb/display/test-cfi/index.html @@ -1,7 +1,7 @@ - Testing CFI functionality + Testing EPUB CFI

Testing EPUB CFI

-
Current CFI: None
-

Reset

+

Reset CFI to None

A div with scrollbars

Scroll down and click on some elements. Make sure to hit both bold and not bold text

But I must explain to you how all this mistaken