diff options
author | Teddy Wing | 2021-08-14 14:18:49 +0200 |
---|---|---|
committer | Teddy Wing | 2021-08-14 15:16:07 +0200 |
commit | d76d092c0865a5529872a4aee1368a14da771e6a (patch) | |
tree | 276ab44da62e2c4b05d49933bcf060cc98da1dc8 | |
parent | 2e40c8a2b18930cf83f28e816a9042254c5edf30 (diff) | |
download | netflix-immersive-d76d092c0865a5529872a4aee1368a14da771e6a.tar.bz2 |
styles.ts: Add new age rating CSS class
New css class for age ratings. The old one appears not to be used any
more. Changed as a result of an early August 2021 player UI overhaul.
-rw-r--r-- | netflix-immersive.user.js | 4 | ||||
-rw-r--r-- | src/styles.ts | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/netflix-immersive.user.js b/netflix-immersive.user.js index 8ab034f..df2bd86 100644 --- a/netflix-immersive.user.js +++ b/netflix-immersive.user.js @@ -155,7 +155,9 @@ function styles() { var style = document.createElement('style'); document.head.appendChild(style); var stylesheet = style.sheet; - stylesheet.insertRule("\n\t\t/* \"Back to Browse\" button that appears when credits are minimised. */\n\t\t.OriginalsPostPlay-BackgroundTrailer .BackToBrowse,\n\n\t\t/* Age rating. */\n\t\t.player-view-childrens,\n\n\t\t/* \"Watch Credits\" button. */\n\t\t[data-uia=\"watch-credits-seamless-button\"],\n\n\t\t/* Skip buttons. */\n\t\ta[aria-label=\"Skip Intro\"],\n\t\ta[aria-label=\"Skip Recap\"],\n\t\ta[aria-label=\"Next Episode\"],\n\t\t[data-uia=\"next-episode-seamless-button\"] {\n\t\t\tvisibility: hidden !important;\n\t\t}", stylesheet.cssRules.length); + // 2021.08.13: May want to remove `.player-view-childrens`, which is now + // replaced by `.advisory-container`. + stylesheet.insertRule("\n\t\t/* \"Back to Browse\" button that appears when credits are minimised. */\n\t\t.OriginalsPostPlay-BackgroundTrailer .BackToBrowse,\n\n\t\t/* Age rating. */\n\t\t.player-view-childrens,\n\t\t.advisory-container,\n\n\t\t/* \"Watch Credits\" button. */\n\t\t[data-uia=\"watch-credits-seamless-button\"],\n\n\t\t/* Skip buttons. */\n\t\ta[aria-label=\"Skip Intro\"],\n\t\ta[aria-label=\"Skip Recap\"],\n\t\ta[aria-label=\"Next Episode\"],\n\t\t[data-uia=\"next-episode-seamless-button\"] {\n\t\t\tvisibility: hidden !important;\n\t\t}", stylesheet.cssRules.length); stylesheet.insertRule("\n\t\t/* Remove white border around credits. */\n\t\t.NFPlayer.can-resume:hover {\n\t\t\tborder: none !important;\n\t\t}", stylesheet.cssRules.length); } exports.default = styles; diff --git a/src/styles.ts b/src/styles.ts index 73ae7c9..5a16d6e 100644 --- a/src/styles.ts +++ b/src/styles.ts @@ -1,4 +1,4 @@ -// Copyright (c) 2020 Teddy Wing +// Copyright (c) 2020–2021 Teddy Wing // // This file is part of Immersive. // @@ -23,12 +23,15 @@ export default function styles () { const stylesheet = style.sheet as CSSStyleSheet; + // 2021.08.13: May want to remove `.player-view-childrens`, which is now + // replaced by `.advisory-container`. stylesheet.insertRule(` /* "Back to Browse" button that appears when credits are minimised. */ .OriginalsPostPlay-BackgroundTrailer .BackToBrowse, /* Age rating. */ .player-view-childrens, + .advisory-container, /* "Watch Credits" button. */ [data-uia="watch-credits-seamless-button"], |