Skip to content

Commit

Permalink
fix tweetviewer clicks
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Dec 8, 2023
1 parent 062ecd3 commit 9b799ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/tweetviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ class TweetViewer {
if(selection.toString().length > 0 && selection.focusNode && selection.focusNode.closest(`div.tweet[data-tweet-id="${t.id_str}"]`)) {
return;
}
if (!e.target.closest(".tweet-button") && !e.target.closest(".tweet-edit-section") && !e.target.closest(".dropdown-menu") && !e.target.closest(".tweet-media-element") && !e.target.closest("a") && !e.target.closest("button")) {
if (!e.target.closest(".tweet-button") && !e.target.closest(".tweet-body-text-span") && !e.target.closest(".tweet-edit-section") && !e.target.closest(".dropdown-menu") && !e.target.closest(".tweet-media-element") && !e.target.closest("a") && !e.target.closest("button")) {
this.savePageData();
history.pushState({}, null, `https://twitter.com/${t.user.screen_name}/status/${t.id_str}`);
this.updateSubpage();
Expand Down Expand Up @@ -976,7 +976,7 @@ class TweetViewer {
<a ${options.mainTweet ? 'hidden' : ''} class="tweet-time" data-timestamp="${new Date(t.created_at).getTime()}" title="${new Date(t.created_at).toLocaleString()}" href="https://twitter.com/${t.user.screen_name}/status/${t.id_str}">${timeElapsed(new Date(t.created_at).getTime())}</a>
<article class="tweet-body ${options.mainTweet ? 'tweet-body-main' : ''}">
<div class="tweet-body-text ${vars.noBigFont || (full_text && full_text.length > 100) || !options.mainTweet ? 'tweet-body-text-long' : 'tweet-body-text-short'}">
<span>${vars.useOldStyleReply ? /*html*/mentionedUserText: ''}${full_text ? await renderTweetBodyHTML(t) : ''}</span>
<span class="tweet-body-text-span">${vars.useOldStyleReply ? /*html*/mentionedUserText: ''}${full_text ? await renderTweetBodyHTML(t) : ''}</span>
</div>
${!isMatchingLanguage ? /*html*/`
<br>
Expand Down

0 comments on commit 9b799ae

Please sign in to comment.