oslego / better-twitter

66 stars 11 forks source link

Remove Explore section #13

Open mat926 opened 4 years ago

mat926 commented 4 years ago

Can you add an option to block the "Explore" section in Twitter? Keep only the search bar visible and remove the trending that's underneath.

oslego commented 4 years ago

@leodoi3 Can you please post a screenshot of where this "Explore" section is? Twitter does A/B testing so it's possible we're not seeing the same interface.

mat926 commented 4 years ago

image image

MadManMoon commented 3 years ago

Seems that it's essentially removing the "<a..." entry in the "<nav..." section of the page that contains "...href="/explore"...". Right?

EDIT! OK, @leodoi3, I have a work around until this is potentially included as a feature.

If you're using a userContent.css for your FireFox sessions, you can add this and it will remove the Explore: @-moz-document domain(twitter.com) { a[href~="/explore"] { display:none !important; } }

So this:

  1. Only works on the twitter.com domain, and any subdomains.
  2. Looks specifically at the a link tag, then ...
  3. Only matches when the href attribute contains /explore (I picked what seemed individual there)
  4. Sets the display style to none to ensure that it's not even resolved on screen.
  5. Uses !important to ram that home. ;-)

I can't speak to what will happen if/when they change their code, but it should work for now. :-)

This will mean that you can't even go to the explore 'tab' at all, however since Better Twitter still keeps the search on the right, you'll still be able to search.

mat926 commented 3 years ago

Seems that it's essentially removing the "<a..." entry in the "<nav..." section of the page that contains "...href="/explore"...". Right?

EDIT! OK, @leodoi3, I have a work around until this is potentially included as a feature.

If you're using a userContent.css for your FireFox sessions, you can add this and it will remove the Explore: @-moz-document domain(twitter.com) { a[href~="/explore"] { display:none !important; } }

So this:

1. Only works on the twitter.com domain, and any subdomains.

2. Looks specifically at the `a` link tag, then ...

3. Only matches when the `href` attribute contains `/explore` (_I picked what seemed individual there_)

4. Sets the display style to `none` to ensure that it's not even resolved on screen.

5. Uses `!important` to ram that home. ;-)

I can't speak to what will happen if/when they change their code, but it should work for now. :-)

This will mean that you can't even go to the explore 'tab' at all, however since Better Twitter still keeps the search on the right, you'll still be able to search.

Yes thats a good workaround , I also tried another by adding a uBlock filter, that also works. Rather still i would love it if this could be implemented for this extension.

AbhimanyuAryan commented 2 years ago

can you remove the explore section +1 for this