Compare commits

...

4 Commits

Author SHA1 Message Date
Jonny Buchanan
6911f9143f Release v4.12.3
- Fixed Discover More Tweets not being hidden when they render before the Discover More heading
- Fixed Premium blue check Tweets the focused Tweet is a reply to being hidden
- Fixed processing blue checks in the Relevant people box when hiding all other sidebar content
2025-06-14 13:48:13 +10:00
Jonny Buchanan
f686b671de - Fixed processing blue checks in the Relevant people box when hiding all other sidebar content 2025-06-14 13:40:29 +10:00
Jonny Buchanan
99a9af186b Add the extension id to the Firefox version's manifest 2025-06-14 13:27:48 +10:00
Jonny Buchanan
571718faa9 - Fixed Discover More Tweets not being hidden when they render before the Discover More heading
- Fixed Premium blue check Tweets the focused Tweet is a reply to being hidden
2025-06-14 13:27:26 +10:00
7 changed files with 28 additions and 17 deletions

View File

@ -4,7 +4,7 @@
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"homepage_url": "https://soitis.dev/control-panel-for-twitter",
"version": "4.12.2",
"version": "4.12.3",
"icons": {
"16": "icons/icon16.png",
"32": "icons/icon32.png",
@ -51,6 +51,7 @@
],
"browser_specific_settings": {
"gecko": {
"id": "{5cce4ab5-3d47-41b9-af5e-8203eea05245}",
"strict_min_version": "121.0"
},
"gecko_android": {

View File

@ -4,7 +4,7 @@
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"homepage_url": "https://soitis.dev/control-panel-for-twitter",
"version": "4.12.2",
"version": "4.12.3",
"icons": {
"16": "icons/icon16.png",
"32": "icons/icon32.png",

View File

@ -793,7 +793,7 @@
</section>
</section>
<div id="version">v4.12.2<span id="debugCountdown"></span></div>
<div id="version">v4.12.3<span id="debugCountdown"></span></div>
</form>
<script src="options.js"></script>
</body>

View File

@ -310,7 +310,7 @@ let $showBlueReplyFollowersCountLabel = /** @type {HTMLElement} */ (document.que
//#region Utility functions
function exportConfig() {
let $a = document.createElement('a')
$a.download = 'control-panel-for-twitter-v4.12.2.config.txt'
$a.download = 'control-panel-for-twitter-v4.12.3.config.txt'
$a.href = URL.createObjectURL(new Blob([
JSON.stringify(optionsConfig, null, 2)
], {type: 'text/plain'}))

View File

@ -640,7 +640,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 94;
CURRENT_PROJECT_VERSION = 95;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 2RDKJDLNY8;
@ -661,7 +661,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MARKETING_VERSION = 4.12.2;
MARKETING_VERSION = 4.12.3;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
@ -703,7 +703,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 94;
CURRENT_PROJECT_VERSION = 95;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 2RDKJDLNY8;
@ -718,7 +718,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MARKETING_VERSION = 4.12.2;
MARKETING_VERSION = 4.12.3;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;

View File

@ -4,7 +4,7 @@
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescriptionShort__",
"homepage_url": "https://soitis.dev/control-panel-for-twitter",
"version": "4.12.2",
"version": "4.12.3",
"icons": {
"48": "icon48.png",
"96": "icon96.png",

View File

@ -8,7 +8,7 @@
// @match https://x.com/*
// @match https://mobile.x.com/*
// @run-at document-start
// @version 196
// @version 197
// ==/UserScript==
void function() {
@ -3020,7 +3020,7 @@ async function observeSidebar() {
observeSearchForm()
}
// Process blue checks in the sidebar user box
if (!config.hideSidebarContent) {
if (!config.hideSidebarContent || config.showRelevantPeople && isOnIndividualTweetPage()) {
void async function() {
// Avoid false positive from Premium upsells in the sidebar
let $aside = await getElement('aside[role="complementary"]:not(:has(a[href^="/i/premium"]))', {
@ -3118,6 +3118,7 @@ async function observeSidebar() {
}()
}
}, {
leading: true,
name:'sidebar container',
observers: pageObservers,
})
@ -5449,8 +5450,6 @@ function onIndividualTweetTimelineChange($timeline, options) {
let hiddenItemTypes = {}
let processedCount = 0
/** @type {Element} */
let $previousItem
/** @type {?boolean} */
let hidPreviousItem
/** @type {boolean} */
@ -5467,9 +5466,21 @@ function onIndividualTweetTimelineChange($timeline, options) {
let $focusedTweet
for (let $item of $timeline.children) {
if (seen.has($item)) {
$previousItem = $item
hidPreviousItem = seen.get($previousItem).hidden
if (seen.has($item) &&
// Reprocess Discover More Tweets if they were processed before the Discover More heading
!(hideAllSubsequentItems && seen.get($item).hidden != config.hideMoreTweets)) {
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 = config.hideMoreTweets
}
continue
}
@ -5650,7 +5661,6 @@ function onIndividualTweetTimelineChange($timeline, options) {
warn('unhandled timeline item', {$item, itemType, hideItem})
}
$previousItem = $item
hidPreviousItem = hideItem
seen.set($item, {itemType, hidden: hideItem})
processedCount++