Skip to content

Commit

Permalink
Update reader.js
Browse files Browse the repository at this point in the history
  • Loading branch information
cdhigh committed Sep 7, 2024
1 parent 0ca13d3 commit 702d0f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions application/static/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,15 @@ function adjustIFrameStyle(iframe) {
var doc = iframe.contentWindow.document || iframe.contentDocument;
var body = doc.body;
iframe.style.display = "block";
//添加一个元素规避chrome对iframe高度计算不准确的问题
if (!isMobile()) {
iframe.style.height = '10000px';
var newDiv = doc.createElement('div');
newDiv.innerHTML = '<br/><p>■ END</p><br/><br/>';
body.appendChild(newDiv);
}
iframe.style.height = 'auto';

body.style.textAlign = 'justify';
body.style.wordWrap = 'break-word';
body.style.hyphens = 'auto';
Expand Down

0 comments on commit 702d0f4

Please sign in to comment.