mirror of
https://github.com/insin/control-panel-for-twitter.git
synced 2025-06-19 07:05:32 -04:00
Changes from v4.12.3
This commit is contained in:
parent
bfd15c51cd
commit
dafaafd930
@ -61,6 +61,7 @@
|
|||||||
],
|
],
|
||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
|
"id": "{5cce4ab5-3d47-41b9-af5e-8203eea05245}",
|
||||||
"strict_min_version": "121.0"
|
"strict_min_version": "121.0"
|
||||||
},
|
},
|
||||||
"gecko_android": {
|
"gecko_android": {
|
||||||
|
23
script.js
23
script.js
@ -3174,7 +3174,7 @@ async function observeSidebar() {
|
|||||||
observeSearchForm()
|
observeSearchForm()
|
||||||
}
|
}
|
||||||
// Process blue checks in the sidebar user box
|
// Process blue checks in the sidebar user box
|
||||||
if (!settings.hideSidebarContent) {
|
if (!settings.hideSidebarContent || settings.showRelevantPeople && isOnIndividualTweetPage()) {
|
||||||
void async function() {
|
void async function() {
|
||||||
// Avoid false positive from Premium upsells in the sidebar
|
// Avoid false positive from Premium upsells in the sidebar
|
||||||
let $aside = await getElement('aside[role="complementary"]:not(:has(a[href^="/i/premium"]))', {
|
let $aside = await getElement('aside[role="complementary"]:not(:has(a[href^="/i/premium"]))', {
|
||||||
@ -5253,8 +5253,6 @@ function onIndividualTweetTimelineChange($timeline, options) {
|
|||||||
let hiddenItemTypes = {}
|
let hiddenItemTypes = {}
|
||||||
let processedCount = 0
|
let processedCount = 0
|
||||||
|
|
||||||
/** @type {Element} */
|
|
||||||
let $previousItem
|
|
||||||
/** @type {?boolean} */
|
/** @type {?boolean} */
|
||||||
let hidPreviousItem
|
let hidPreviousItem
|
||||||
/** @type {boolean} */
|
/** @type {boolean} */
|
||||||
@ -5271,9 +5269,21 @@ function onIndividualTweetTimelineChange($timeline, options) {
|
|||||||
let $focusedTweet
|
let $focusedTweet
|
||||||
|
|
||||||
for (let $item of $timeline.children) {
|
for (let $item of $timeline.children) {
|
||||||
if (seen.has($item)) {
|
if (seen.has($item) &&
|
||||||
$previousItem = $item
|
// Reprocess Discover More Tweets if they were processed before the Discover More heading
|
||||||
hidPreviousItem = seen.get($previousItem).hidden
|
!(hideAllSubsequentItems && seen.get($item).hidden != settings.hideDiscoverSuggestions)) {
|
||||||
|
let details = seen.get($item)
|
||||||
|
hidPreviousItem = details.hidden
|
||||||
|
// The focused Tweet renders before any Tweets it was a reply to
|
||||||
|
if (details.itemType == 'FOCUSED_TWEET') {
|
||||||
|
changes = []
|
||||||
|
hiddenItemCount = 0
|
||||||
|
hiddenItemTypes = {}
|
||||||
|
}
|
||||||
|
// The Discover More heading renders after Discover more Tweets(?)
|
||||||
|
else if (details.itemType == 'DISCOVER_MORE_HEADING') {
|
||||||
|
hideAllSubsequentItems = settings.hideDiscoverSuggestions
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5454,7 +5464,6 @@ function onIndividualTweetTimelineChange($timeline, options) {
|
|||||||
warn('unhandled timeline item', {$item, itemType, hideItem})
|
warn('unhandled timeline item', {$item, itemType, hideItem})
|
||||||
}
|
}
|
||||||
|
|
||||||
$previousItem = $item
|
|
||||||
hidPreviousItem = hideItem
|
hidPreviousItem = hideItem
|
||||||
seen.set($item, {itemType, hidden: hideItem})
|
seen.set($item, {itemType, hidden: hideItem})
|
||||||
processedCount++
|
processedCount++
|
||||||
|
Loading…
Reference in New Issue
Block a user