Coder Social home page Coder Social logo

insin / control-panel-for-twitter Goto Github PK

View Code? Open in Web Editor NEW
1.8K 12.0 61.0 25.44 MB

Browser extension which gives you more control over your Twitter timeline and adds missing features and UI improvements - available for desktop and mobile browsers

Home Page: https://jbscript.dev/control-panel-for-twitter

License: MIT License

HTML 9.89% JavaScript 83.56% CSS 4.37% Swift 1.72% AppleScript 0.09% Shell 0.38%
chrome-extension twitter edge-extension firefox-addon user-friendly safari-extension productivity userscript legal-comedy masterful-gambits

control-panel-for-twitter's Issues

Hide tweets at will (suggestion)

(didn't notice this was on git at first, i earlier left an identical post on the google chrome webstore lmao)

I don't know if this is viable, but I'd really like an option to hide tweets. As in, like, from a dropdown box, make it so I don't see a particular tweet ever again. Also, I want to do this to my own tweets without deleting them. I really hate how they go to the top of my latest tweets. If I'm in a particularly abusive argument, there's cases where my tweets is important to leave up, but seeing it can make me relive the argument in my head again and it's upsetting to me. So how about it, is that possible to implement potentially? Thanks.

Hide More Tweets does not work in Vivaldi but does in Chrome

I've been completely unable to hide the More Tweets section in tweets that were opened in a new tab from TweetDeck using the Chrome extension and userscript versions. My main browser is the current stable version of Vivaldi, but using the same extension in Chrome allows More Tweets to not render every time.

Suggestion: "Take Screenshot" and "Stamp This Tweet" Buttons

1- Sometimes I take screenshot tweets on Twitter. When I want to take screenshot, I zoom in page (like 150%), inspect profile picture and tweet's photo and update strings to original (sometimes it can be larger image) URL from default URL on in tweets and use screenshot tool on inspect to take screenshot.

For example this tweet.

Normally this method is very time wasting and tough. But with you can take screenshot hd-quality with this method. Maybe you can make practice this.

2 - There is an account called tweetstamp.org that archiving and generating new URL for tweets on Twitter. Previously I could see tweetstamp link to use tweet ID [for example: https://twitter.com/Canan_Kaftanci/status/1423187867367526401 >> https://tweetstamp.org/1423187867367526401] using a browser extension called Swift Selection Search with a search URL [https://tweetstamp.org/{searchTerms}] But this site give errors with this method.

Screen Shot 2021-08-05 at 12 17 59

If you don't want to see these errors, you need to write "@tweet_stamp stamp" on writing tweet bar. I don't like this writing things. Maybe you can make practice. Because this archiving and new link generating site is useful on Twitter. Your add-on is about Twitter.

Option to hide likes in feed

It would be very nice to be able to hide "likes" from feed. Likes are very annoying. I think people are lazy and like tweets to bookmark them. It is anyway not interesting to see what others liked.

Ignore <title> changes caused by new notifications

When you get a notification the <title> changes with a notification count, e.g. Latest Tweets / Twitter(1) Latest Tweets / Twitter

This triggers a re-setup as if you'd navigated and breaks current page detection.

Change how extension options are saved so default changes will be picked up

Currently, if you make any changes to the extension options, the entire configuration is saved, including whatever the defaults were.

This means if we release a version with a new option and someone changes any option after updating, if a change is made to the new option's default value in a subsequent release (as just happened in v2.3.2), they won't pick it up.

Instead, we should keep the configuration changes people have made in a separate object, which gets merged on top of the defaults to display the options page, and save only their changes.

Add support for List timelines

Just creating an issue to dump some initial investigation into

Adding a separate timeline header

firefox_DCLpYQsFBD

  1. Find the <h2> containing the list title
  2. Create a clone of its parent as a next sibling to hold the fake timeline heading
  3. Make the following style changes on their shared parent:
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

Do people ever use the Share button next to the menu button? Nothing on the menu it pops up seems that useful:

firefox_xzwDZokQ8m

Real-time config change

Listen for config changes in the content script and apply/un-apply them (when possible) on the fly.

Just a nice little detail, and it would make for a good demonstration of what the extension does.

Make the center content take full width

Request from the 🍊🕸:

https://news.ycombinator.com/item?id=23879926

This seems to do the trick…

document.querySelector('[data-testid="primaryColumn"]').style.maxWidth = 'none'
document.querySelector('[data-testid="primaryColumn"]').firstElementChild.lastElementChild.style.maxWidth = 'none'
document.querySelector('[data-testid="sidebarColumn"]').style.display = 'none'

…but it makes media tweets absolutely massive:

lpOo8UnVcL

Highlight "Latest Tweets" / "Retweets" to indicate which one you're viewing

The theme colour is a fiddly to get at (IndexedDB: localforage > keyvaluepairs > device:rweb.settings >themeColor, then you'd have to figure out how to dig the appropriate style out of <style id="react-native-web">.sheet.cssRules) so might just be easiest to grab it from the computed style of the big Tweet button (getComputedStyle(document.querySelector('a[data-testid="SideNav_NewTweet_Button"]')).backgroundColor) and figure out when we need to observe it for changes.

Instructions on how to contribute? (+ Addon corrupt - Firefox only)

This is my first time working with a browser extension, and I want to contribute to it.
As this is my first time, I don't know entirely how to get this to work with Firefox when building, so I try to go about it normally like any other Javascript project.
I run npm install, installs everything needed for web-ext, then I run npm build. I drop it into my extensions page in Firefox developer edition, but when I drop in the artifact it says the addon is corrupt. This doesn't make much sense to me considering I haven't made any changes to the script at all

image

Who To Follow and other Twitter Suggestions are bleeding in.

Needs an update urgently.

And yes, tested both userscript and addon.

Managed to somewhat clean it up by adding the following rules to my uBlock Origin:

twitter.com##[role="tablist"]
twitter.com##[role="heading"][aria-level="2"]:has-text(Topics to follow):xpath(../../..)
twitter.com##[href="/i/topics/picker/home"][role="link"]:xpath(../..)
twitter.com##[aria-label="Timeline: Carousel"]:xpath(../../..)
twitter.com##[d="M12.225 12.165c-1.356 0-2.872-.15-3.84-1.256-.814-.93-1.077-2.368-.805-4.392.38-2.826 2.116-4.513 4.646-4.513s4.267 1.687 4.646 4.513c.272 2.024.008 3.46-.806 4.392-.97 1.106-2.485 1.255-3.84 1.255zm5.849 9.85H6.376c-.663 0-1.25-.28-1.65-.786-.422-.534-.576-1.27-.41-1.968.834-3.53 4.086-5.997 7.908-5.997s7.074 2.466 7.91 5.997c.164.698.01 1.434-.412 1.967-.4.505-.985.785-1.648.785z"]:xpath(../../../../../..)
twitter.com##[href^="/i/connect_people"][role="link"]:xpath(../..)
twitter.com##[aria-level="2"][role="heading"]:has-text(Who to follow):xpath(../../..)

Add a Retweets link for viewing Retweets only

This allows you to have you a timeline consisting only of original and quote tweets, but still go look at what people are Retweeting if you want to.

This basically needs to tell the script to switch to hiding everything on the timeline that isn't a retweet, then we're hoping that the windowing of rendered tweets will keep loading tweets until we have a screenful.

Suggestion: Switch project over to Typescript?

Seeing as there's lots of JSDoc comments for setting types, I would like to suggest that the project switches to Typescript.
I'm currently trying to poke around the project and VSCode just doesn't autofill things for me for variables and such

Mobile version support

Using the current, non-fully-compatible version in Firefox for Android Nightly

To try the current, non-fully-compatible version, install Firefox for Android Nightly and follow these instructions, using the following details to add a Custom Add-on collection:

  • 13844640
  • Android-Collection

You'll now be able to install Tweak New Twitter

Some of the settings for the desktop version break the mobile version, so you'll have to use these settings:

With this, you'll have a mobile version of Twitter which stays on Latest Tweets and lets you hide Retweets and Quote Tweets.

What needs to be fixed

  • Removing stuff from the sidebar doesn't apply on mobile and when enabled, it currently hides the search item from the button bar
  • Mobile needs its own version of hiding unwanted/unused navigation items, as navigation is now in a pop-out menu
  • We need to find somewhere else to put the control for accessing the separated tweets timeline
  • The method used to create a pinned tweet when viewing Quote Tweets doesn't work (but it does still hide the duplicates)
  • The options page needs to feature detect and only show relevant options for the current platform

New stuff

  • Hide the "Open app" link when viewing an individual tweet

Any other feature requests? Put them down below 👇

Hide images in timeline tweets by default, click to view

For a low-noise timeline with more text, fewer images.

With New Twitter, you no longer move off the timeline and lose your place if you click on an image (unless it decides it's time to randomly load more tweets, like it does).

  • Single images
  • 2-4 images
  • GIFs
  • Other video (if not handled the same way as GIFs)
  • Images/video in metadata from a linked URL

Stylus is a non-spying-on you fork of the Stylish extension which is handy for tinkering with a site's CSS in a persistent manner.

Hiding the account switcher hides the only way to log out

As reported here:

https://twitter.com/josephfelldown/status/1414361564975706119

Discovered that the "Tweak New Twitter" extension I use to make this awful place more bearable removes the log out button, which is ironic.

This would reduce it to just the menu ellipsis instead:

header[role="banner"] > div > div > div > div:last-child {
  flex-shrink: 1 !important;
  align-items: end !important;
}
[data-testid="SideNav_AccountSwitcher_Button"] > div:first-child,
[data-testid="SideNav_AccountSwitcher_Button"] > div:first-child + div {
  display: none;
}

firefox_oPH8K5vrGe

Should we still offer the option to completely hide it, or just make this what the "Hide account switcher (in footer)" setting does?

Full middle click support

Add support to use middle click on the entire tweet, also on quoted tweets, so you can open the tweets into a new tab.
ctrl + normal click works, but it would be a huge improvement to new twitter, if this was possible.

Thanks for the great script / addon.

[feature request] Add an option to hide "more tweets" when you open a tweet using a direct link from somewhere else

There's this absolutely weird page with the tweet you're interested in collapsed at the top, then a block with a couple replies, and then "more tweets". Because engagement, apparently. Someone probably got a bonus or even a promotion for this. Anyway, the thread you're interested in is hidden behind an additional click. It shouldn't be. Would be nice to have an option to skip this superfluous page automatically.

Suggestion: Allow disabling of certain metrics

I currently use uBlock Origin to block Likes & Retweets as Tweak New Twitter only allows the disabling of all metrics.
Would be nice to have a tick-box of likes, retweets, replies, and followers/following all separate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.