This Chrome extension allows you to toggle hiding verified posts on Twitter. When the extension is active, it will hide all tweets from verified users.
Now available on the Chrome Extension Store
This is an altered version that does not use the tabs permission so has a little bit more errors, but still works.
registerTab()
function sends a message to the background script to register the current tab.updateBlockedCount(count)
function sends a message to the background script to update the count of blocked tweets.toggleHidingVerifiedPosts(isHiding)
function hides or shows verified posts based on the isHiding
parameter. It also updates the blocked count.chrome.runtime.onMessage
listener listens for messages from the background script to toggle hiding verified posts.chrome.storage.sync.get
function gets the current hiding preference from the storage and applies it to the page.setInterval
function is used to periodically check for changes on the page and apply the hiding preference accordingly.hideStyle
CSS rule is added to the page to enable hiding tweets by adding the hidden-verified-user
class to the tweet container.verifiedBadgeSelector
.tweetContainerSelector
.hideClass
(“hidden-verified-user”) to the tweet container.chrome.storage.sync
, allowing the preference to sync across devices.setInterval
function is used to periodically re-check and apply the hiding preference to ensure it works with the dynamic loading of tweets on Twitter.If you want to try to block people without using the soon(tm) to be defunct api as well, try this untested code: //gist.github.com/sardistic/e7c9973d79d1f17d0e4f1d541de3dc16
June 27, 2023
You must be logged in to post a comment.