Commit Graph

294 Commits

Author SHA1 Message Date
Jonny Buchanan
ab85ad9bb5 Run the page script in the MAIN world and communicate with it via BroadcastChannel instead of having it monitor a <script> tag 2025-06-01 22:37:28 +10:00
Jonny Buchanan
15b33a6d55 Change content, options and page scripts to use the new v5 config storage format
- All page script settings are now stored in a single settings object
- All other top-level config is for extension-internal settings
- Renamed old settings which were marked with comments in types.d.ts

Background script
- Open welcome (new installs) or updated (v4 → v5) page post-install
- Migrate v4 user settings to new v5 format on update

Page script:
- Removed userscript pragma
- Renamed page script config variable to 'settings'

Scripts:
- Moved utility and script API functions to lib.js
- Updated copy script to copy all *.mv*.* files in the root dir
- Added a clean script and command to remove files which correspond to a *.mv*.* file
2025-06-01 18:18:27 +10:00
Jonny Buchanan
09b5e7b72d Release v4.12.1
- Fixed restored Tweet source and link headlines not displaying in some browsers
2025-06-01 14:50:02 +10:00
Jonny Buchanan
dab3344b15 Release v4.12.0
- Added an "Enabled" option to allow extension functionality to be turned off from its own options - when disabled, the icon in the toolbar will have a ⏻ badge (Safari) or be greyed out (all other browsers)
- Added an option to restore the Tweet source label in focused Tweets (enabled by default)
- Added hiding the "Upgrade to Premium+ to write longer posts" Premium upsell
- Changed the options for hiding Premium replies to all be "Show" options so they're easier to understand - if a Premium reply matches any of your "Show" options, it will be shown
- Split the option for showing Premium replies from verified orgs into separate options for Business and Government accounts
- Fixed the same Tweets being repeatedly re-checked in focused Tweet timelines when new Tweets are added - should improve performance in long Tweet threads
- Fixed flash of initial X loading logo
- Fixed verified Government accounts getting the Twitter Blue check
- Fixed the options in the Number of followers dropdown not being localised
- Fixed the desktop nav font size option applying to the notifications count
2025-05-31 19:35:38 +10:00
Jonny Buchanan
75423f6818 Add translation for "Enabled" 2025-05-31 19:18:46 +10:00
Jonny Buchanan
bd604e4a7a Fixed verified Government accounts getting the Twitter Blue check
Reworked options for hiding Premium replies to use all "Show" options
Simplified logic for showing allowed Premium replies
Split the option for showing verified orgs into Business and Government options
Fixed the numbers in the Show accounts with over ${number} followers option not being localised
2025-05-31 16:47:04 +10:00
Jonny Buchanan
4bed7b236e Added an option to restore the Tweet source label in focused Tweets (enabled by default)
Fixed the same Tweets being repeatedly re-checked in focused Tweet timelines when new Tweets are added
Refactored focused Tweet tweaks which were previously working around being called repeatedly
Hide UI elements we add to focused tweets when the extension is disabled after adding them

Closes #737
2025-05-31 10:28:10 +10:00
Jonny Buchanan
7a54fbd193 Added an "Enabled" option to allow extension functionality to be toggled off and on without having to disable it in your browser's extension management UI
- Pulled lastFlexDirection state up so it can be reset
- Added a globalObservers scope object so global functionality can be disabled
- Refactored observeElement:
  - Use Maps of disconnectables instead of lists
  - Now handles adding disconnectables to the appropriate scope object itself
  - Automatically disconnects any observer with the same name when observing an element
  - Disconnectables are now automatically removed from their scope object when disconnected
  - A leading call of the callback is now an explicit option which must be opted into
- Made CSS functions remove their stylesheets when disabled
- Reset state in main() so initial setup runs again when re-enabled
- Extracted settings sync setup out of main() so it always runs to receive enabled status changes
- Added a background script to update the browser action icon to match enabled state

Also:

- Fixed flash of X logo on initial load by handling the logo
  - Handle this synchronously in the content script
  - Reflect enabled and replaceLogo settings in localStorage

Closes #514
2025-05-29 13:37:08 +10:00
Jonny Buchanan
d0e54a9d75 Release v4.11.1
- Hid another new Premium upsell in Premium user profiles
2025-05-26 16:06:46 +10:00
Jonny Buchanan
52de4d1c19 Release v4.11.0
- Added an option to hide the Live bar in the mobile timeline when someone you follow is broadcasting
- Added an option to hide the Live with X box in the desktop sidebar
- Added an option to hide the What's happening box in the desktop sidebar
- Added an option to hide Who to follow and other suggested follow boxes in the desktop sidebar
- Moved these to a new Sidebar options group, as they don't all belong in the Remove algorithmic content group
- Added changing "Live on X" to "Live on Twitter" when Replace X branding changes is enabled
- Added hiding promoted trends
- Added hiding Install button cards in some Grok tweets
- Added hiding Ask Grok button in Tweets
- Added hiding a new premium upsell in the desktop sidebar
- Fixed a link headline restoration false positive on Install button cards in Grok tweets
- Fixed hiding the ad in What's happening when not hiding sidebar contents
- Fixed Japanese translation wording and sentence endings
- Increased timeout waiting for the "you aren't verified yet" premium upsell to appear in your own profile
- Removed the Hide Pro nav option, as it's no longer applicable
2025-05-17 03:52:39 +10:00
Jonny Buchanan
b080052f6f Fixed the Premium upsell in Home sidebar being detected as What's happening
Apply the Show Relevant people setting when using hideSuggestedFollows
Fixed hideSuggestedFollows hiding the entire sidebar in individual Tweet pages
2025-05-17 03:40:23 +10:00
Jonny Buchanan
155b72f650 Added an option to hide the live broadcast bar in the mobile timeline when someone you follow is hosting
Added an option to hide the Live with X box in the desktop sidebar
Added an option to hide the What's happening box in the desktop sidebar
Added an option to hide Who to follow and other suggested follow boxes in the desktop sidebar
Moved these to a new Sidebar options group, as they don't all belong in the Remove algorithmic content group
Change "Live on X" to "Live on Twitter" when Replace X branding changes is enabled

Closes #227
Closes #587
2025-05-02 11:20:34 +10:00
Jonny Buchanan
2fc1fb0f28 Release v4.10.1
- Hide the ad in What's happening when not hiding sidebar contents
- Hide the ad at the top of Explore when not hiding Explore's contents
- Hide a new "This profile is verified" Premium upsell when viewing a Premium profile
- Hide a new Premium Analytics upsell in your own profile when not hiding sidebar contents
- Hide a new hovercard Premium upsell on desktop
- Fixed hiding the Premium upsell in the Home sidebar when not hiding sidebar contents
- Fixed hiding the user's own replies if they have Premium, when hiding Premium replies in threads
- Process blue checks in the sidebar user box when not hiding sidebar contents
- Process blue checks in Explore when not hiding Explore's contents
- Don't run on URLs used for OAuth authorization
2025-04-28 02:24:10 +10:00
Jonny Buchanan
7a9dc56f90 Revert "Added an option to hide the new Your Analytics nav item (default: enabled)" 2025-04-28 00:45:12 +10:00
Jonny Buchanan
1bf2ea1a3a Added an option to hide the new Your Analytics nav item (default: enabled)
Hid a new Premium Analytics upsell in your own profile when sidebar contents aren't being hidden
2025-03-29 02:34:00 +10:00
Jonny Buchanan
97c5c0ea23 v4.10.0
- Added an option to hide Grok Tweets
- Fixed the restored Twitter reply box placeholder for Japanese and a few other languages
- Fixed restoring Twitter placeholders in the desktop Compose Tweet modal after using Drafts/Media/GIF search/Schedule
- Fixed the empty title on the Messages page on desktop causing bugs on the next page you visit (e.g. For you timeline re-appearing in Home)
- Removed top-level toggles for some groups of options in the options page
2025-03-13 18:08:00 +10:00
Jonny Buchanan
b90880a375 Removed top-level checkbox groups as they don't always make sense to always turn on/off together
Removed commented-out Communities option
2025-02-21 02:12:31 +10:00
Jonny Buchanan
0fbc3c968d Added an option to hide Grok tweets 2025-02-21 02:11:07 +10:00
Jonny Buchanan
85fb7ad06d Release v4.9.0
- Added an option to prevent the next video autoplaying on mobile (enabled by default) - videos will loop instead
- Changed the "Hide total tweet metrics" option to "Hide profile header metrics", as metrics in the profile header now change when you switch profile tabs
- Fixed hiding Views and the Share Tweet button in the mobile media viewer
- Fixed Follow/Following button styles in the mobile media viewer when you're using the option to uninvert them elsewhere on Twitter
- Fixed processing Premium checks in mobile media viewer video info
- Fixed hiding the "You aren't verified yet" Premium upsell on your own profile page
2025-02-20 04:57:18 +10:00
Jonny Buchanan
be831eb645 Improved Mobile media viewer support
- Added an option to prevent the next video autoplaying on mobile - videos will loop instead
- Fixed hiding Views and the Share Tweet button in the mobile media viewer
- Fixed style of the Follow/Following button in the mobile media viewer, when uninverting them elsewhere
- Fixed processing premium checks in mobile media viewer video info

Removed a workaround for a now-fixed Twitter sticky title bug, as this was causing the mobile media viewer to be processed twice

Closes #714
2025-02-20 04:53:03 +10:00
Jonny Buchanan
2a5f8eada6 Renamed the "Total tweet metrics" option to "Profile header metrics", as metrics in the profile header now change when you switch profile tabs 2025-02-19 10:41:19 +10:00
Jonny Buchanan
95384a58ef Release v4.8.2
- Added hiding "Discover new Lists" suggestions in the Lists page
- Added missing translations for "What's happening?" and "Tweet your reply" where Twitter currently uses the English version
- Changed the Hide "Discover more" tweets option to Hide "Discover" suggestions
- Fixed most "What's happening?" translations based on Twitter's locale data
- Fixed hiding a Premium upsell in the Communities header
- Fixed search filters in the sidebar being hidden (again) - added a temporary workaround for Twitter leaving a stray divider at the top of the sidebar
2025-02-19 08:36:26 +10:00
Jonny Buchanan
f8258fbcd9 Renamed the Hide "Discover more" tweets option to Hide "Discover" suggestions
Added hiding Discover new Lists suggestions in the Lists page when this option is enabled

Fixes #350
2025-02-19 04:16:43 +10:00
Jonny Buchanan
d70416931d Release v4.8.1
- Added restoring Twitter placeholders to the desktop Compose Tweet modal
- Added restoring "Add another Tweet" placeholders when creating a thread in the Tweet editor
- Changed option labels for defaulting sorting of replies to match recent Twitter changes
- Fixed a conflict with the OldTweetDeck extension by not redirecting /i/tweetdeck to twitter.com
- Fixed pinned Community tab contents being hidden when hiding the Tweet box in the timeline on desktop
- Fixed the timeline Tweet editor not being tweaked if the Tweet box is removed and later re-added
- Fixed restoring Twitter placeholders, Tweet button text and handling premium checks on the Compose Tweet page on mobile
2025-02-18 18:11:31 +10:00
Jonny Buchanan
a720a01957 Disable timeline stats logging by default and add a debug option to enable it 2025-02-17 11:44:32 +10:00
Jonny Buchanan
9ed1b82576 Release v4.8.0
- Added an option to redirect from x.com to twitter.com
  - If you're logged out of twitter.com, you will be redirected to the login page to avoid an infinite redirection loop
  - Note: this redirect will only work for as a long as Twitter supports the ?mx=1 query parameter they added as part of the migration to x.com
- Added automatically closing the new Premium upsell modal which sometimes appears after submitting a new Tweet on desktop
- Added an option to hide the main Compose Tweet button
- Added a Custom CSS option to the Experiments section
- Added display of the version number you're using to the options page
- Fixed the option for defaulting "Sort replies by"
  - Note: on mobile, Twitter appear to have broken their own UI for changing sorting, so if you use this option you won't be able to change reply sorting while looking at a Tweet thread
- Fixed hiding the "Edit" upsell in the menu on your own recent Tweets
2025-02-16 05:04:42 +10:00
Jonny Buchanan
d857b7e545 Added a Custom CSS option to the Experiments section
#221
2025-02-16 04:22:59 +10:00
Jonny Buchanan
de3b54f6e5 Display the version number at the end of the options
Debug options are now enabled by clicking the version number 5 times
2025-02-16 02:27:59 +10:00
Jonny Buchanan
4d7bdeeb59 Added an option to hide the main Compose Tweet button 2025-02-16 01:05:48 +10:00
Jonny Buchanan
b49efdc0e8 Fix TypeScript warnings so we don't have to mentally cache "normal number of warnings to have"
Make JSDoc usage of @returns consistent
2025-02-16 00:44:29 +10:00
Jonny Buchanan
cc7fb13d50 Added an option to redirect from x.com to twitter.com
Fixed hiding the Highlights and Articles premium upsell tabs on your own profile page on twitter.com

This redirect will only work for as a long as Twitter supports the ?mx=1 query parameter
2025-02-15 23:35:14 +10:00
Jonny Buchanan
c307e3e5d2 Release v4.7.1
- Fixed sidebar contents not being hidden on the Home timeline due to a Twitter change (currently) only on this screen
2025-02-13 07:21:48 +10:00
Jonny Buchanan
64a07a75d1 Release v4.7.0
Changes

- Added a new Notifications option to the Reduce "engagement" settings
  - "Hide badges only" hides all notification count badges, the notification count in the page title and the notification favicon
  - "Hide" also hides the Notifications nav item to discourage checking notifications
- Added display of Retweets and Likes counts when restoring links under your own Tweets
  - The Likes link is now only restored under your own Tweets, as the Likes tab isn't visible for other people's Tweets
- Hid a new Premium upsell underneath your own focused Tweets
- Fixed a border left behind after hiding the Analytics link under your own Tweets
- Fixed Control Panel for Twitter clashing with the one sec extension when both are being used

New layout changes

- Enabling the Tweak new layout option now doesn't do anything if you don't have the new layout, so you can leave it enabled if only some of your accounts have it
- Fixed contrast of nav item text when navigation is expanded
- Made the "More" button larger to match the tweaked nav icons
- Added an option to hide the Toggle navigation button in the new layout
2025-02-08 21:07:40 +10:00
Jonny Buchanan
0ccc3b7cb9 Added an option to hide the Toggle navigation button in the new layout 2025-02-05 12:19:29 +10:00
Jonny Buchanan
692e4382a7 Added a new Notifications option to the Reduce "engagement" settings
- "Hide badges only" hides all notification count badges, the notification count in document title and the notification favicon
- "Hide" also hides the Notifications nav item to discourage checking notifications
2025-02-05 08:46:23 +10:00
Jonny Buchanan
a3a67a4f2b Release v4.6.2
- Added more contrast/branding colour tweaks for the new layout
- Fixed the Grok Profile Summary button in user hovercards not being hidden if "Premium blue checks" is set to "Do nothing"
- Fixed double primary column left border when navigation is expanded in the new layout
- Fixed Japanese "What's happening?" translation
2025-01-30 04:02:14 +10:00
Jonny Buchanan
c641b399b4 Release v4.6.1
- Fixed the Grok drawer animation sometimes being visible when hiding Grok
- Fixed premium upsells sometimes being visible in your own profile page on mobile
- Fixed hiding the new Radar premium upsell in Search results
- Fixed the new Radar premium upsell breaking display of Search filters when hiding sidebar contents
- Enabled use of the experimental "Tweak new layout" option on mobile, as the new layout affects mobile too
- Added some initial tweaks for the new layout on mobile
- Removed restoring the notification count on desktop from new layout tweaks, as Twitter fixed this
2025-01-28 19:32:08 +10:00
Jonny Buchanan
8514980a25 Enable the "Tweak new layout" option on mobile, as it affects mobile too
Added some initial tweaks for the new layout on mobile
Hide the new Radar premium upsell in Search results
Fixed the new Radar premium upsell breaking showing Search filters when hiding sidebar contents
2025-01-28 18:28:38 +10:00
Jonny Buchanan
c28a6e83e8 Release v4.6.0
- Added an experimental "Tweak new layout" option for people who have the new Twitter layout on desktop to try
- Added support for hiding items in the new layout's More dialog
- Fixed styling of the separated Retweets/Quote Tweets tab with the new layout
- Fixed styling of hidden tabs with the new layout
- Added restoring the "What's happening?" placeholder in the desktop timeline Tweet box
- Hide the Grok summary at the top of search results
2025-01-27 03:39:24 +10:00
Jonny Buchanan
49d8a7e35b Added an experimental "Tweak new layout" option for people who have the new Twitter layout on desktop to try
This fixes some of the more obvious problems with the new layout - we'll
document what these are in a blog post once the new layout has had a wider
rollout, and after we see which initial changes Twitter make based on
feedback (which we've also provided)

#705

Added support for hiding items in the new layout's More dialog
Added restoring the "What's happening?" placeholder in the desktop timeline Tweet box
Fixed styling of the separated Retweets/Quote Tweets tab with the new layout
Fixed styling of hidden tabs with the new layout
2025-01-27 03:34:19 +10:00
Jonny Buchanan
25acc3b765 Release v4.5.5
- Hide another new Grok button in user profiles
2025-01-20 10:17:22 +10:00
Jonny Buchanan
048c13e247 Release v4.5.4
- Hide the new Grok drawer on desktop
- Hide the new "Radar" Premium upsell in Search on desktop
2025-01-18 12:51:29 +10:00
Jonny Buchanan
f4ced4f451 Release v4.5.3
- Fixed a layout issue in the Home timeline when hiding the For you timeline, but not hiding Grok suggestions in Tweets
2025-01-12 22:38:48 +10:00
Jonny Buchanan
7321852a56 Release v4.5.2
- Hide suggested Grok prompts in Tweets
- Changed how Tweets are hidden to also hide the new separator between them
2025-01-08 19:12:30 +10:00
Jonny Buchanan
cad4300010 Release v4.5.1
- Replace daruma version of X logo (Japan-only)
2024-12-25 04:06:56 +10:00
Jonny Buchanan
d07462f618 Release v4.5.0
- Added Italian translation by @katullo11
- Improved French translation by @luclu7
- Hide the Grok "Profile Summary" button in user hovercards on desktop
2024-12-23 10:18:34 +10:00
Jonny Buchanan
2cbb19171a Release v4.4.6
- Hide the Grok "Generate image" button which was added to the Tweet editor
2024-12-19 22:31:21 +10:00
Jonny Buchanan
c33b1750a9 Release v4.4.5
- Hide the Grok Actions button in focused tweets
2024-12-15 20:36:33 +10:00
Jonny Buchanan
ca43fdf2eb Release v4.4.4
- Fixed the high contrast magenta dark mode theme colour
2024-12-13 14:44:11 +10:00
Jonny Buchanan
998281387c Release v4.4.3
Improvements when restoring the theme colour for Tweet buttons

- Added support for accessible high-contrast mode colours
- Fixed the Tweet icon color in dark mode when the navigation menu is collapsed on desktop
2024-12-08 16:16:42 +10:00