aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2020-05-08 18:29:15 +0200
committerTeddy Wing2020-05-08 18:29:15 +0200
commit8a75b2b5c2963c464596abfd45bd64183980f4e3 (patch)
tree81e43a9c247dbced6f1125d6caeb7fa2ca8634bd
parent4e2ad017e928a7ee22fcfe063f22d57201577283 (diff)
downloadnetflix-immersive-8a75b2b5c2963c464596abfd45bd64183980f4e3.tar.bz2
styles: Combine all our rules into one
Since we set `visibility: hidden` for all elements, combine them all into a single CSS rule.
-rw-r--r--src/styles.ts25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/styles.ts b/src/styles.ts
index 26d34ed..0f29ab7 100644
--- a/src/styles.ts
+++ b/src/styles.ts
@@ -5,26 +5,17 @@ export function styles () {
const stylesheet = style.sheet as CSSStyleSheet;
- // "Back to Browse" button that appears when credits are minimised.
- stylesheet.insertRule(
- '.OriginalsPostPlay-BackgroundTrailer .BackToBrowse { visibility: hidden; }',
- stylesheet.cssRules.length
- );
+ stylesheet.insertRule(`
+ /* "Back to Browse" button that appears when credits are minimised. */
+ .OriginalsPostPlay-BackgroundTrailer .BackToBrowse,
- // Age rating.
- stylesheet.insertRule(
- '.player-view-childrens { visibility: hidden; }',
- stylesheet.cssRules.length
- );
+ /* Age rating. */
+ .player-view-childrens,
- // "Watch Credits" button.
- stylesheet.insertRule(
- '[data-uia="watch-credits-seamless-button"] { visibility: hidden; }',
- stylesheet.cssRules.length
- );
+ /* "Watch Credits" button. */
+ [data-uia="watch-credits-seamless-button"],
- // Skip buttons.
- stylesheet.insertRule(`
+ /* Skip buttons. */
a[aria-label="Skip Intro"],
a[aria-label="Skip Recap"],
a[aria-label="Next Episode"],