Skip to content

Commit

Permalink
[fix] 修复在书本首页使用无效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
DoooReyn committed Mar 27, 2020
1 parent 66ae155 commit 6583e83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions wx_auto_reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,13 @@
//重新获取页面元素
var title, chapter, app, c_h, s_h, l_h, page_pos, scroll_enabled;
function fetchPageElement() {
title = _getElement(_title_element_name).innerText;
chapter = _getElement(_chapter_element_name).innerText;
try {
title = _getElement(_title_element_name).innerText;
chapter = _getElement(_chapter_element_name).innerText;
} catch (err) {
title = "微读自动阅读器";
chapter = "首页";
}
app = document.getElementById(_app_element_name);
c_h = app.clientHeight;
s_h = app.scrollHeight;
Expand Down
2 changes: 1 addition & 1 deletion wx_auto_reader.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6583e83

Please sign in to comment.