Greasy Fork is available in English.
放大calibre-web版epubjs阅读器的字体,增加进度显示
当前为
// ==UserScript==
// @name epubjsgood
// @namespace http://tampermonkey.net/
// @version 0.12
// @description 放大calibre-web版epubjs阅读器的字体,增加进度显示
// @author You
// @match http://140.238.41.74:8083/read/*
// @match https://bbs.nga.cn/*
// @grant none
// ==/UserScript==
(function () {
'use strict';
var that = reader.book;
var rdt = reader.rendition;
var chapter = $("#chapter-title")[0].innerText
reader.rendition.themes.fontSize('1.3em')
//console.log(reader.rendition.currentLocation())
$(document).keydown(function (e) {
// $("#chapter-title")[0].innerText;
//alert($("#chapter-title")[0].innerText);
//console.log(reader.rendition.currentLocation())
var lct = reader.book.locations
var currentLocation = reader.rendition.currentLocation();
var progress = Math.floor(((lct.percentageFromCfi(currentLocation.start.cfi)).toFixed(5)) * 10000) / 100;
$("#chapter-title")[0].innerText = chapter + '[' + progress + '%]'
});
$(document).mousedown(function (e) {
// $("#chapter-title")[0].innerText;
//alert($("#chapter-title")[0].innerText);
//console.log(reader.rendition.currentLocation())
var lct = reader.book.locations
var currentLocation = reader.rendition.currentLocation();
var progress = Math.floor(((lct.percentageFromCfi(currentLocation.start.cfi)).toFixed(5)) * 10000) / 100;
$("#chapter-title")[0].innerText = chapter + '[' + progress + '%]'
});
$(document).ready(function () {
that.ready.then(() => {
return that.locations.generate()
}).then(result => {
//console.log(result.locations);
var lct = reader.book.locations
var currentLocation = reader.rendition.currentLocation();
var progress = Math.floor(((lct.percentageFromCfi(currentLocation.start.cfi)).toFixed(5)) * 10000) / 100;
$("#chapter-title")[0].innerText = chapter + '[' + progress + '%]'
})
});
})();