File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44// @name :zh-TW 懶人小説下載器
55// @name :ja 怠惰者小説ダウンロードツール
66// @namespace hoothin
7- // @version 1.25
7+ // @version 1.23
88// @description Fetch and download main content on current page, provide special support for chinese novel
99// @description :zh-CN 通用网站内容抓取工具,可批量抓取小说、论坛内容等并保存为TXT文档
1010// @description :zh-TW 通用網站內容抓取工具,可批量抓取小說、論壇內容等並保存為TXT文檔
121121
122122 function getPageContent ( doc ) {
123123 if ( ! doc ) return i18n . error ;
124+ if ( doc . defaultView )
124125 [ ] . forEach . call ( doc . querySelectorAll ( "span,div" ) , function ( item ) {
125126 var thisStyle = doc . defaultView . getComputedStyle ( item ) ;
126127 if ( thisStyle && ( thisStyle . display == "none" || thisStyle . fontSize == "0px" ) )
248249 break ;
249250 }
250251 }
251- if ( ! has && aEle . href && / ^ h t t p / i. test ( aEle . href ) && / P A R T \b | P r o l o g u e | - \d + | 分 卷 | C h a p t e r \s * \d + | 第 .+ [ 章 | 节 | 回 | 卷 | 折 | 篇 | 幕 | 集 ] | ^ 序 $ | 序 \s * 言 | 序 \s * 章 | 前 \s * 言 | 引 \s * 言 | 引 \s * 子 | 摘 \s * 要 | 楔 \s * 子 | 契 \s * 子 | 后 \s * 记 | 附 \s * 言 | 结 \s * 语 | [ \d | 〇 | 零 | 一 | 二 | 三 | 四 | 五 | 六 | 七 | 八 | 九 | 十 | 百 | 千 | 万 | 萬 | - ] + ( 、 | ) | \. ) / i. test ( aEle . innerText ) ) {
252+ if ( ! has && aEle . href && / ^ h t t p / i. test ( aEle . href ) && / P A R T \b | P r o l o g u e | - \d + | 分 卷 | C h a p t e r \s * \d + | 第 .+ [ 章 | 节 | 回 | 卷 | 折 | 篇 | 幕 | 集 ] | ^ 序 $ | 序 \s * 言 | 序 \s * 章 | 前 \s * 言 | 引 \s * 言 | 引 \s * 子 | 摘 \s * 要 | 楔 \s * 子 | 契 \s * 子 | 后 \s * 记 | 附 \s * 言 | 结 \s * 语 | [ \d | 〇 | 零 | 一 | 二 | 三 | 四 | 五 | 六 | 七 | 八 | 九 | 十 | 百 | 千 | 万 | 萬 | - ] + ( 、 | ) | \. \D ) / i. test ( aEle . innerText ) ) {
252253 list . push ( aEle ) ;
253254 }
254255 }
You can’t perform that action at this time.
0 commit comments