mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
...
This commit is contained in:
parent
929d6adf6f
commit
a46f333d3e
@ -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]
|
||||
|
30
src/calibre/ebooks/oeb/display/test-cfi/iframe.html
Normal file
30
src/calibre/ebooks/oeb/display/test-cfi/iframe.html
Normal file
@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Testing EPUB CFI</title>
|
||||
</head>
|
||||
<body>
|
||||
<p id="whitespace">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 <b>loves or
|
||||
pursues or desires</b> 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</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -118,6 +118,10 @@
|
||||
<img src="marker.png" width="150" height="200" alt="Test Image"
|
||||
style="border: solid 1px black"/>
|
||||
|
||||
<h2>Iframes</h2>
|
||||
<p>Try clicking anywhere in the iframe below:</p>
|
||||
<iframe src="iframe.html"></iframe>
|
||||
|
||||
<h2>Video</h2>
|
||||
<p>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).
|
||||
</p>
|
||||
<video width="320" height="240" controls="controls" preload="auto"
|
||||
src="birds.webm" type="video/webm" />
|
||||
src="birds.webm" type="video/webm"></video>
|
||||
|
||||
</div>
|
||||
<img id="marker" style="position: absolute; display:none; z-index:10"
|
||||
|
Loading…
x
Reference in New Issue
Block a user