Compare commits
No commits in common. "31e91d16bfab4f90980e1a77da6671a44312e631" and "1130f3ff00d5be231a9e5b25913e236bae1e75a6" have entirely different histories.
31e91d16bf
...
1130f3ff00
3 changed files with 4 additions and 23 deletions
|
|
@ -94,11 +94,11 @@
|
||||||
|
|
||||||
<script src="/static/epub.js/js/libs/jquery.min.js"></script>
|
<script src="/static/epub.js/js/libs/jquery.min.js"></script>
|
||||||
<script src="/static/epub.js/js/libs/zip.min.js"></script>
|
<script src="/static/epub.js/js/libs/zip.min.js"></script>
|
||||||
<script src="/static/reader/epub.js?2"></script>
|
<script src="/static/reader/epub.js"></script>
|
||||||
<!-- Render -->
|
<!-- Render -->
|
||||||
<script src="/static/epub.js/js/epub.js"></script>
|
<script src="/static/epub.js/js/epub.js"></script>
|
||||||
<!-- Reader -->
|
<!-- Reader -->
|
||||||
<script src="/static/epub.js/js/reader.js"></script>
|
<script src="/static/epub.js/js/reader.min.js"></script>
|
||||||
|
|
||||||
<!-- Plugins -->
|
<!-- Plugins -->
|
||||||
<!-- <script src="js/plugins/search.js"></script> -->
|
<!-- <script src="js/plugins/search.js"></script> -->
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,8 @@ See https://github.com/adobe-type-tools/cmap-resources
|
||||||
<!--
|
<!--
|
||||||
<script src="/static/pdf.js/debugger.js"></script>
|
<script src="/static/pdf.js/debugger.js"></script>
|
||||||
-->
|
-->
|
||||||
<script src="/static/pdf.js/viewer.js?2"></script>
|
<script src="/static/pdf.js/viewer.js"></script>
|
||||||
<script src="/static/reader/pdf.js?2"></script>
|
<script src="/static/reader/pdf.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ var reader;
|
||||||
var id = document.location.pathname.split('/')[1];
|
var id = document.location.pathname.split('/')[1];
|
||||||
var annotations = JSON.parse(localStorage[id + '.annotations'] || '[]')
|
var annotations = JSON.parse(localStorage[id + '.annotations'] || '[]')
|
||||||
var currentSelection;
|
var currentSelection;
|
||||||
var fontSize = parseInt(localStorage.epubFontSize || '100', 10)
|
|
||||||
|
|
||||||
function saveAnnotations() {
|
function saveAnnotations() {
|
||||||
localStorage[id + '.annotations'] = JSON.stringify(annotations)
|
localStorage[id + '.annotations'] = JSON.stringify(annotations)
|
||||||
|
|
@ -43,7 +42,6 @@ document.onreadystatechange = function () {
|
||||||
var rendition = reader.rendition,
|
var rendition = reader.rendition,
|
||||||
book = reader.book;
|
book = reader.book;
|
||||||
|
|
||||||
rendition.themes.fontSize(fontSize + "%");
|
|
||||||
annotations.forEach(function(a) {
|
annotations.forEach(function(a) {
|
||||||
rendition.annotations.highlight(a.cfiRange, a.data || {}, onHighlightClicked);
|
rendition.annotations.highlight(a.cfiRange, a.data || {}, onHighlightClicked);
|
||||||
})
|
})
|
||||||
|
|
@ -81,23 +79,6 @@ document.onreadystatechange = function () {
|
||||||
currentSelection = null
|
currentSelection = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (event.keyCode == 61 && event.shiftKey) {
|
|
||||||
fontSize += 10
|
|
||||||
rendition.themes.fontSize(fontSize + "%");
|
|
||||||
localStorage.epubFontSize = fontSize
|
|
||||||
event.preventDefault()
|
|
||||||
} else if (event.keyCode == 173 && event.shiftKey) {
|
|
||||||
fontSize -= 10
|
|
||||||
rendition.themes.fontSize(fontSize + "%");
|
|
||||||
localStorage.epubFontSize = fontSize
|
|
||||||
event.preventDefault()
|
|
||||||
} else if (event.keyCode == 48 && event.shiftKey) {
|
|
||||||
fontSize = 100
|
|
||||||
rendition.themes.fontSize(fontSize + "%");
|
|
||||||
localStorage.epubFontSize = fontSize
|
|
||||||
event.preventDefault()
|
|
||||||
}
|
|
||||||
console.log(fontSize)
|
|
||||||
})
|
})
|
||||||
rendition.on("mark", function(cfiRange, contents) {
|
rendition.on("mark", function(cfiRange, contents) {
|
||||||
console.log('!! mark', cfiRange)
|
console.log('!! mark', cfiRange)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue