|
@@ -586,8 +586,8 @@ class ParseCard {
|
|
if (!dom_card || !dom_card.parentElement) {
|
|
if (!dom_card || !dom_card.parentElement) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- let dom = dom_card.querySelector('div[id^=jsc_c_]').parentElement
|
|
|
|
- dom.style = 'min-height:500px'
|
|
|
|
|
|
+ let card = dom_card.querySelector('div[id^=jsc_c_]');
|
|
|
|
+ let dom = card && card.parentElement;
|
|
if (dom) {
|
|
if (dom) {
|
|
for (let i = 0; i < dom.childNodes.length; i++) {
|
|
for (let i = 0; i < dom.childNodes.length; i++) {
|
|
if (dom.childNodes[i].dataset && dom.childNodes[i].dataset.testid && dom.childNodes[i].dataset.testid == 'card.wrapper') {
|
|
if (dom.childNodes[i].dataset && dom.childNodes[i].dataset.testid && dom.childNodes[i].dataset.testid == 'card.wrapper') {
|
|
@@ -602,9 +602,11 @@ class ParseCard {
|
|
let post_Id = originUrl.pathname.slice(1);
|
|
let post_Id = originUrl.pathname.slice(1);
|
|
|
|
|
|
if (post_Id.indexOf('luckdraw/') >= 0) {
|
|
if (post_Id.indexOf('luckdraw/') >= 0) {
|
|
|
|
+ dom.style = 'min-height:500px'
|
|
post_Id = post_Id.replace('luckdraw/', '');
|
|
post_Id = post_Id.replace('luckdraw/', '');
|
|
dom.appendChild(this.createIframe({ post_Id, tweet_author, page_type: '抽奖' }, true))
|
|
dom.appendChild(this.createIframe({ post_Id, tweet_author, page_type: '抽奖' }, true))
|
|
- } else if (!post_Id.includes('/')) {
|
|
|
|
|
|
+ } else if (post_Id.indexOf('/') === -1) {
|
|
|
|
+ dom.style = 'min-height:500px'
|
|
dom.appendChild(this.createIframe({ post_Id, tweet_author }, true))
|
|
dom.appendChild(this.createIframe({ post_Id, tweet_author }, true))
|
|
}
|
|
}
|
|
}
|
|
}
|