|
|
@@ -1,5 +1,5 @@ |
|
|
|
/********************************************************************* |
|
|
|
* #### Twitter Post Fetcher v14.0 #### |
|
|
|
* #### Twitter Post Fetcher v15.0 #### |
|
|
|
* Coded by Jason Mayes 2015. A present to all the developers out there. |
|
|
|
* www.jasonmayes.com |
|
|
|
* Please keep this disclaimer with my code if you use it. Thanks. :-) |
|
|
@@ -186,49 +186,50 @@ |
|
|
|
var x = 0; |
|
|
|
|
|
|
|
if (supportsClassName) { |
|
|
|
var tmp = div.getElementsByClassName('tweet'); |
|
|
|
var tmp = div.getElementsByClassName('timeline-Tweet'); |
|
|
|
while (x < tmp.length) { |
|
|
|
if (tmp[x].getElementsByClassName('retweet-credit').length > 0) { |
|
|
|
if (tmp[x].getElementsByClassName('timeline-Tweet-retweetCredit').length > 0) { |
|
|
|
rts.push(true); |
|
|
|
} else { |
|
|
|
rts.push(false); |
|
|
|
} |
|
|
|
if (!rts[x] || rts[x] && showRts) { |
|
|
|
tweets.push(tmp[x].getElementsByClassName('e-entry-title')[0]); |
|
|
|
tweets.push(tmp[x].getElementsByClassName('timeline-Tweet-text')[0]); |
|
|
|
tids.push(tmp[x].getAttribute('data-tweet-id')); |
|
|
|
authors.push(swapDataSrc(tmp[x] |
|
|
|
.getElementsByClassName('p-author')[0])); |
|
|
|
.getElementsByClassName('timeline-Tweet-author')[0])); |
|
|
|
times.push(tmp[x].getElementsByClassName('dt-updated')[0]); |
|
|
|
permalinksURL.push(tmp[x].getElementsByClassName('permalink')[0]); |
|
|
|
if (tmp[x].getElementsByClassName('inline-media')[0] !== |
|
|
|
if (tmp[x].getElementsByClassName('timeline-Tweet-media')[0] !== |
|
|
|
undefined) { |
|
|
|
images.push(tmp[x].getElementsByClassName('inline-media')[0]); |
|
|
|
images.push(tmp[x].getElementsByClassName('timeline-Tweet-media')[0]); |
|
|
|
} else { |
|
|
|
images.push(undefined); |
|
|
|
} |
|
|
|
} |
|
|
|
x++; |
|
|
|
} |
|
|
|
} else { |
|
|
|
var tmp = getElementsByClassName(div, 'tweet'); |
|
|
|
var tmp = getElementsByClassName(div, 'timeline-Tweet'); |
|
|
|
while (x < tmp.length) { |
|
|
|
tweets.push(getElementsByClassName(tmp[x], 'e-entry-title')[0]); |
|
|
|
tids.push(tmp[x].getAttribute('data-tweet-id')); |
|
|
|
authors.push(swapDataSrc(getElementsByClassName(tmp[x], |
|
|
|
'p-author')[0])); |
|
|
|
times.push(getElementsByClassName(tmp[x], 'dt-updated')[0]); |
|
|
|
permalinksURL.push(getElementsByClassName(tmp[x], 'permalink')[0]); |
|
|
|
if (getElementsByClassName(tmp[x], 'inline-media')[0] !== undefined) { |
|
|
|
images.push(getElementsByClassName(tmp[x], 'inline-media')[0]); |
|
|
|
} else { |
|
|
|
images.push(undefined); |
|
|
|
} |
|
|
|
|
|
|
|
if (getElementsByClassName(tmp[x], 'retweet-credit').length > 0) { |
|
|
|
if (getElementsByClassName(tmp[x], 'timeline-Tweet-retweetCredit').length > 0) { |
|
|
|
rts.push(true); |
|
|
|
} else { |
|
|
|
rts.push(false); |
|
|
|
} |
|
|
|
if (!rts[x] || rts[x] && showRts) { |
|
|
|
tweets.push(getElementsByClassName(tmp[x], 'timeline-Tweet-text')[0]); |
|
|
|
tids.push(tmp[x].getAttribute('data-tweet-id')); |
|
|
|
authors.push(swapDataSrc(getElementsByClassName(tmp[x], |
|
|
|
'timeline-Tweet-author')[0])); |
|
|
|
times.push(getElementsByClassName(tmp[x], 'dt-updated')[0]); |
|
|
|
permalinksURL.push(getElementsByClassName(tmp[x], 'permalink')[0]); |
|
|
|
if (getElementsByClassName(tmp[x], 'timeline-Tweet-media')[0] !== undefined) { |
|
|
|
images.push(getElementsByClassName(tmp[x], 'timeline-Tweet-media')[0]); |
|
|
|
} else { |
|
|
|
images.push(undefined); |
|
|
|
} |
|
|
|
} |
|
|
|
x++; |
|
|
|
} |
|
|
|
} |
|
|
|
0 comments on commit
525b64e