|
@@ -455,6 +455,7 @@ function parseDOMRedPacket() {
|
|
|
let _type = ''
|
|
|
for (let i in arr) {
|
|
|
if (arr[i].innerText == '#DeNet') {
|
|
|
+ let _tweetId = ''
|
|
|
let _article = arr[i].closest('article')
|
|
|
let _txt_area = _article.querySelector('[lang]')
|
|
|
let _postId = _txt_area.innerText
|
|
@@ -466,9 +467,12 @@ function parseDOMRedPacket() {
|
|
|
_type = 'parnet'
|
|
|
_dom = _txt_area.parentNode.parentNode
|
|
|
}
|
|
|
- let _tweetId = _article.querySelector('a[aria-label]').getAttribute('href').split('/status/')[1]
|
|
|
- if(bindTwitterArt.needBind) {
|
|
|
- bindTwitterArtMethod({postId: _postId, twitterId: _tweetId});
|
|
|
+ let _a_area = _article.querySelector('a[aria-label]')
|
|
|
+ if(_a_area && _a_area.getAttribute('href')){
|
|
|
+ _tweetId = _a_area.getAttribute('href').split('/status/')[1] || ''
|
|
|
+ if(bindTwitterArt.needBind) {
|
|
|
+ bindTwitterArtMethod({postId: _postId, twitterId: _tweetId});
|
|
|
+ }
|
|
|
}
|
|
|
replaceDOMRedPacket(_type, _dom, _postId, _tweetId)
|
|
|
}
|