Skip to content

Commit

Permalink
Update contentScript.js
Browse files Browse the repository at this point in the history
  • Loading branch information
queeeeeeee authored Sep 27, 2023
1 parent 1ab04e4 commit e46ad69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contentScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ async function makeButton() {
var retweet = null;
for (var i = 0; i < retweets.length; i++) {
var now = retweets[i];
var target = now.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
var target = now.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
// alert(target.innerHTML)
if (target.getAttribute('tabindex') === "-1") {
retweet = retweets[i];
break;
}
}

if (retweet == null) {
await sleep(200);
makeButton();
Expand Down Expand Up @@ -200,4 +200,4 @@ chrome.runtime.onMessage.addListener((obj, sender, response) => {
makeButton();
else if (obj === "makeRandomButton")
makeRandomButton();
});
});

0 comments on commit e46ad69

Please sign in to comment.