See @description in the Source Code.
DeAnnoy New York Times [papo] by papo
Details
Authorpapo
LicenseCC BY-NC-SA 4.0
Categorynytimes
Created
Updated
Size5.0 kB
Statistics
Learn how we calculate statistics in the FAQ.
Failed to fetch stats.
Description
Notes
Userstyle doesn't have notes.Source code
/* ==UserStyle==
@name DeAnnoy New York Times [papo]
@namespace github.com/paponius/userstyles
@version 1.3.0
@description Updated: 2024-11. Notes and feedback: https://github.com/paponius/userstyles/. Removed distracting and annoying elements. Check what it does in style Options, or read @var descriptions on top of the code.
@author Papo
@homepageURL https://github.com/paponius/userstyles/
@supportURL https://github.com/paponius/userstyles/
@license CC BY-NC-SA 4.0
@preprocessor less
# --- END: common block ---
@var checkbox UnstickHPSectionsMenuBar "Unstick: Homepage: sections menu bar" 1
@var checkbox UnstickSecond 'Unstick: Article pages: "storyline" header bar sometimes floating on top' 1
@var checkbox UnstickHeader 'Unstick: Article pages: "The New York Times" bar (it shows when the above is not shown)' 1
@var checkbox hideShareBar "Unstick: Article pages: Bar with NYT Logo, Article title, share buttons sometimes floating on top" 0
@var checkbox unstickLiveBlogMenu "Unstick: LiveBlog pages: navi bar floating on top" 1
@var checkbox UnstickSecondEvents "Unstick: Event pages: navi bar floating on top on /news-event/ pages" 1
@var checkbox HideMidArticleAnnoy "Hide mid-article subscription and unrelated annoyance boxes" 1
@var checkbox NoRecycle 'Distraction Free: Do not Recycle me (no More Stories, no Related, ...)' 0
#var checkbox showSideRecirc "Show Recirculation bar on right in article" 1
#var checkbox showFixedRecirc "Show Fixed Recirculation bar on bottom" 1
#var checkbox showBelowRecirc "Show Recirculation section bellow the article" 1
==/UserStyle== */
/* tpl: 1.2.2 24-11 */
@-moz-document domain("nytimes.com") {
/* masthead-container */
/* Note: not()
On "interactive" page - i.e. horrible modern design,
the main header is transparent BG, has position: absolute; and must not be set to position: relative
body:not(:has(main#site-content section.interactive-content))
does not work 2411, it's not on this "interactive" page and on contrary it can be on standard article page in:
.StoryBodyCompanionColumn div[id*="_MAIN_CONTENT_"][data-testid="region"]
it uses the same html classnames as ordinary article:
<html lang="en" class="story nytapp-vi-article nytapp-vi-story story nytapp-vi-article " ...
this is liveblog, something else again:
<html lang="en" xmlns:og="http://opengraphprotocol.org/schema/" class="nytapp-vi-liveblog" ...
*/
/* todo 2411 works wrongly, the opposite as it should. hides bar on top, does not hide when page scrolled, (and secondary hidden)
https://www.nytimes.com/2024/11/25/business/trump-electric-vehicle-tax-credit.html */
& when (@UnstickHeader = 1) {
@media (min-width: 1024px) {
[data-testid="masthead-container"]:not(:has(a[data-testid="masthead-mobile-logo"] svg[fill="#fff"])) {
/* --was-position: fixed; */
position: relative;
}
article#story {
padding-top: 0;
/* --was-padding-top: 40px; */
}
}
/* another header, used on /interactive/ */
#standalone-header {
position: absolute !important;
}
}
/* storyline-menu-title */
& when (@UnstickSecond = 1) {
article#story > div:first-of-type {
position: relative;
}
}
& when (@UnstickSecondEvents = 1) {
main#site-content > div:has(p#storyline-menu-title):not(:has(> article)):not(.live-blog-above-main-content) {
position: relative;
}
}
& when (@hideShareBar = 1) {
#in-story-masthead {
display: none;
}
}
& when (@unstickLiveBlogMenu = 1) {
.live-blog-above-main-content {
/* display: none; */
position: relative;
}
}
/* there are two identical header bar navigation elements. This one is sometimes floating. props are set in-line */
& when (@UnstickHPSectionsMenuBar = 1) {
header > div:has(nav[data-testid="floating-desktop-nested-nav"]) {
visibility: hidden !important;
/* --was-visibility: visible; */
transform: unset !important;
/* --was-transform: translateY(-70px); */
}
}
& when (@HideMidArticleAnnoy = 1) {
/* subscribe to spam, "Editors’ Picks", ...? */
/* both props are there, let's see which is more durable */
.StoryBodyCompanionColumn section[role="complementary"]
, .StoryBodyCompanionColumn section[data-testid="NextBestAction"] {
display: none;
}
/* "Behind the Journalism. Our business coverage. Times journalists are not allowed to have any direct financial stake in companies they cover." */
.StoryBodyCompanionColumn div[id*="_MAIN_CONTENT_"][data-testid="region"] {
display: none;
}
}
& when (@NoRecycle = 1) {
#c-col-editors-picks,
#newsletter-recirculation,
#bottom-sheet-sensor
{ display: none; }
}
/* === old 10/3/2018 === */
/* side More... links */
aside.css-14jsv4e {
display: none unless showSideRecirc;
}
/* fixed overlay links */
.Ribbon-ribbon--3jG7Y {
display: none unless showFixedRecirc;
}
.Recirculation-recirculation--2BQm- {
display: none unless showBelowRecirc;
}
}