File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4747 } ;
4848 break ;
4949 }
50+ var firefox = navigator . userAgent . toLowerCase ( ) . indexOf ( 'firefox' ) != - 1 ;
5051
5152 function indexDownload ( aEles ) {
5253 var rocketContent = document . createElement ( "div" ) ;
150151 allSingle = false ;
151152 }
152153 if ( allSingle ) {
153- curNum = ( navigator . userAgent . toLowerCase ( ) . indexOf ( ' firefox' ) == - 1 ?content . innerText . length :content . textContent . length ) ;
154+ curNum = ( firefox ?content . textContent . length :content . innerText . length ) ;
154155 } else {
155156 if ( ! hasText ) continue ;
156157 if ( pageData == document && content . offsetWidth <= 0 && content . offsetHeight <= 0 )
157158 continue ;
158159 [ ] . forEach . call ( content . childNodes , function ( item ) {
159- if ( item . nodeType == 3 )
160- curNum += item . data . length ;
160+ if ( item . nodeType == 3 ) curNum += item . data . length ;
161+ else if ( / ^ ( I | A | S T R O N G | B | F O N T ) $ / . test ( item . tagName ) ) curNum += ( firefox ? item . textContent . length : item . innerText . length ) ;
161162 } ) ;
162163 }
163164 if ( curNum > largestNum ) {
You can’t perform that action at this time.
0 commit comments