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 b259636722..afe5578b08 100644 --- a/src/calibre/ebooks/oeb/display/test-cfi/cfi-test.coffee +++ b/src/calibre/ebooks/oeb/display/test-cfi/cfi-test.coffee @@ -64,6 +64,9 @@ window.onload = -> alert(error) return document.onclick = mark_and_reload + for iframe in document.getElementsByTagName("iframe") + iframe.contentWindow.document.onclick = mark_and_reload + r = location.hash.match(/#(\d*)epubcfi\((.+)\)$/) if r window.current_cfi = r[2] diff --git a/src/calibre/ebooks/oeb/display/test-cfi/iframe.html b/src/calibre/ebooks/oeb/display/test-cfi/iframe.html new file mode 100644 index 0000000000..fb2f0f969c --- /dev/null +++ b/src/calibre/ebooks/oeb/display/test-cfi/iframe.html @@ -0,0 +1,30 @@ + + +
+But I must explain to you how all this mistaken + idea of denouncing pleasure and praising pain was born and I will + give you a complete account of the system, and expound the actual + teachings of the great explorer of the truth, the master-builder of + human happiness. No one rejects, dislikes, or avoids pleasure + itself, because it is pleasure, but because those who do not know + how to pursue pleasure rationally encounter consequences that are + extremely painful. Nor again is there anyone who loves or + pursues or desires to obtain pain of itself, because it is + pain, but because occasionally circumstances occur in which toil + and pain can procure him some great pleasure. To take a trivial + example, which of us ever undertakes laborious physical exercise, + except to obtain some advantage from it? But who has any right to + find fault with a man who chooses to enjoy a pleasure that has no + annoying consequences, or one who avoids a pain that produces no + resultant pleasure? On the other hand, we denounce with righteous + indignation and dislike men who are so beguiled and demoralized by + the charms of pleasure of the moment, so blinded by desire, that + they cannot foresee
+ + + + + diff --git a/src/calibre/ebooks/oeb/display/test-cfi/index.html b/src/calibre/ebooks/oeb/display/test-cfi/index.html index 53d84de0c7..9ece7940a7 100644 --- a/src/calibre/ebooks/oeb/display/test-cfi/index.html +++ b/src/calibre/ebooks/oeb/display/test-cfi/index.html @@ -118,6 +118,10 @@Try clicking anywhere in the iframe below:
+ +Try clicking on this video while it is playing. The page should reload with the video paused at the point it was at when you @@ -125,7 +129,7 @@ play (otherwise the click will cause a reload).
+ src="birds.webm" type="video/webm">