Skip to content

Commit

Permalink
Click the "Show this thread" link to get off the "More Tweets" view i…
Browse files Browse the repository at this point in the history
…nstead of "View more replies"

"Show this thread" is always available under the intinal tweet, so it makes
this feature less jumpy

Closes #24 (again)
  • Loading branch information
insin committed Jul 17, 2020
1 parent a24487e commit 029d058
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tweak-new-twitter.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,17 +632,17 @@ function onTitleChange(title) {
}

/**
* Automatically click the "View more replies" link to get rid of the "More Tweets" section if the
* Automatically click the "Show this thread" link to get rid of the "More Tweets" section if the
* user is viewing a tweet from an external link with a ?ref_src= URL.
*/
async function hideMoreTweetsSection(path) {
let id = URL_TWEET_ID_RE.exec(path)[1]
let $link = await getElement(`a[href="/i/status/${id}"]`, {
name: '"View more replies" link',
let $link = await getElement(`a[href$="/status/${id}"]`, {
name: '"Show this thread" link',
stopIf: pathIsNot(path),
})
if ($link != null) {
log('clicking "View more replies" link')
log('clicking "Show this thread" link')
$link.click()
}
}
Expand Down

0 comments on commit 029d058

Please sign in to comment.