|
|
@@ -236,13 +236,19 @@
|
|
|
InitFontSize = 18;
|
|
|
}
|
|
|
$("p").css('font-size', InitFontSize);
|
|
|
+ $("h4").css('font-size', InitFontSize);
|
|
|
|
|
|
|
|
|
function ReaderBaseFrame(container) { //UI渲染层
|
|
|
|
|
|
function ParseChapterData(jsonData) { //生成要展示的 html文本
|
|
|
let jsonObj = jsonData;
|
|
|
- let html = "<br/><h4 style='text-align: center'>" + jsonObj.t + "</h4>";
|
|
|
+ CurrFontSize = Util.StorageGetter("font_size");
|
|
|
+ CurrFontSize = parseInt(CurrFontSize);
|
|
|
+ if (!CurrFontSize) {
|
|
|
+ CurrFontSize = 18;
|
|
|
+ }
|
|
|
+ let html = "<br/><h4 style='text-align: center; font-size: " + CurrFontSize + "px'>" + jsonObj.t + "</h4>";
|
|
|
if (jsonObj.ct) {
|
|
|
let hLevel = 4;
|
|
|
for (let i = 0; i < jsonObj.ct.length; i++) {
|
|
|
@@ -254,7 +260,7 @@
|
|
|
if (Chapter_id == 0) {
|
|
|
html += "<div>" + jsonObj.p[i] + "</div>";
|
|
|
} else {
|
|
|
- html += "<p>" + jsonObj.p[i] + "</p>";
|
|
|
+ html += "<p style='font-size: " + CurrFontSize + "px'>" + jsonObj.p[i] + "</p>";
|
|
|
}
|
|
|
}
|
|
|
html = html.replace("##", )
|
|
|
@@ -558,11 +564,12 @@
|
|
|
})
|
|
|
//点击 大、小事件
|
|
|
Dom.btn_Big.click(function() {
|
|
|
- if (InitFontSize >= 22) {
|
|
|
+ if (InitFontSize >= 24) {
|
|
|
return;
|
|
|
}
|
|
|
InitFontSize += 1;
|
|
|
$("p").css('font-size', InitFontSize);
|
|
|
+ $("h4").css('font-size', InitFontSize);
|
|
|
Util.StorageSetter("font_size", InitFontSize);
|
|
|
});
|
|
|
Dom.btn_Small.click(function() {
|
|
|
@@ -571,6 +578,7 @@
|
|
|
}
|
|
|
InitFontSize -= 1;
|
|
|
$("p").css('font-size', InitFontSize);
|
|
|
+ $("h4").css('font-size', InitFontSize);
|
|
|
Util.StorageSetter("font_size", InitFontSize);
|
|
|
});
|
|
|
//点击夜间&日间 切换模式
|