Hides the 'For you' tab on Twitter, optionally hides the tab selection.
Twitter: hide tab 'For you' by rybak
Details
Authorrybak
LicenseMIT
Categorytwitter.com
Created
Updated
Size2.2 kB
Statistics
Learn how we calculate statistics in the FAQ.
Failed to fetch stats.
Description
Notes
Changelog
- v12: fixed mobile version after recent HTML layout changes
- v11: changed wording of settings
- v10: fixed checkbox "Hide tab 'For you'" in desktop website
- v9: fixed mobile version after recent HTML layout changes
- v8: added support for https://x.com
- v7: added support for https://mobile.twitter.com
- v6: Twitter changed its <nav> tag
- v5: fixed a bug, which caused editor controls to be hidden
- v4: cleaned up code formatting
- v3: simplified code
- v2: fixed tabs getting hidden in other tab selectors (search, followers, etc)
- v1: initial release
Source code
/* ==UserStyle==
@name Twitter: hide tab 'For you'
@namespace https://andrybak.dev
@version 12
@description Hides the 'For you' tab on Twitter, optionally hides the tab selection.
@homepageURL https://github.com/rybak/
@license MIT
@author Andrei Rybak
@preprocessor stylus
@var checkbox hideForYouTab "Hide tab 'For you'" 1
@var checkbox hideTabs "Hide all tabs" 0
==/UserStyle== */
/*
* Copyright (c) 2023-2024 Andrei Rybak
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
@-moz-document url("https://twitter.com/home"), url("https://x.com/home") {
if hideForYouTab {
main .r-tzz3ar[role="tablist"] > div:first-child {
display: none;
}
nav.css-175oi2r > div > div > div > div.css-175oi2r.r-6b64d0.r-cpa5s6.r-16y2uox:first-child,
nav.css-175oi2r > div > div > div > div.css-175oi2r.r-14tvyh0.r-cpa5s6.r-16y2uox:first-child {
display: none;
}
}
if hideTabs {
main nav.r-1hvjb8t .r-tzz3ar[role="tablist"] {
display: none;
}
nav.css-175oi2r > div.css-175oi2r.r-1awozwy.r-1ro0kt6.r-18u37iz.r-16y2uox.r-1pi2tsx.r-1ny4l3l {
display: none;
}
}
}