From 227485026e8ae6b640366b93c3812664887923c8 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Sat, 6 Jul 2024 05:42:31 +0300 Subject: [PATCH] added goodreads and imdb new rating selectors --- LICENSE | 2 +- css/goodreads.css | 2 ++ css/imdb.css | 4 +++- js/common.js | 4 ++-- manifest.json | 2 +- options.html | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/LICENSE b/LICENSE index 47add1d..97c329a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017-2021 ganigeorgiev +Copyright (c) 2017-present ganigeorgiev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/css/goodreads.css b/css/goodreads.css index 10858e7..5671cc4 100644 --- a/css/goodreads.css +++ b/css/goodreads.css @@ -9,8 +9,10 @@ html:not(.show-ratings) .AverageRating, html:not(.show-ratings) .AggregateRating, html:not(.show-ratings) .RatingStatistics, html:not(.show-ratings) .ReviewsSectionStatistics, +html:not(.show-ratings) .BookRatingStars, html:not(.show-ratings) .BookStatistics__ratingStatistics, html:not(.show-ratings) .BookStatistics__histogram, +html:not(.show-ratings) .BookListItemRating__column.BookListItemRating__column--secondary, html:not(.show-ratings) .RatingStars, html:not(.show-ratings) .SocialSignalsSection, html:not(.show-ratings) .SocialSignalsSection + .Divider, diff --git a/css/imdb.css b/css/imdb.css index cde9eb4..0b98fc9 100644 --- a/css/imdb.css +++ b/css/imdb.css @@ -11,7 +11,9 @@ html:not(.show-ratings) .rating-other-user-rating, html:not(.show-ratings) .imdbRatingPlugin, html:not(.show-ratings) .ipc-rating-star--imdb, html:not(.show-ratings) .ipc-poster-card__rating-star-group, -html:not(.show-ratings) .ipc-rating-star, +html:not(.show-ratings) .ipc-reaction-summary, +html:not(.show-ratings) .metacritic-score-box, +html:not(.show-ratings) .metacritic-score-label, html:not(.show-ratings) .ipc-voting__label__count, html:not(.show-ratings) [class*="TitleBlock__RatingContainer"], html:not(.show-ratings) [class*="RatingBar__RatingContainer"], diff --git a/js/common.js b/js/common.js index 5f7da7d..d8f6c97 100644 --- a/js/common.js +++ b/js/common.js @@ -23,8 +23,8 @@ function toggleDocumentClass(value, className) { className = className || 'show-ratings'; if (value) { - document.querySelector('html').classList.add(className); + document.documentElement?.classList?.add(className); } else { - document.querySelector('html').classList.remove(className); + document.documentElement?.classList?.remove(className); } } diff --git a/manifest.json b/manifest.json index 64e25cf..036ee3a 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "Hide ratings (IMDB,Goodreads,MyAnimeList,...)", "description": "Hides the rating bars from IMDB, Goodreads, MyAnimeList and Letterboxd.", - "version": "2.1.0", + "version": "2.2.0", "action": { "default_icon": "images/icon64.png", "default_popup": "options.html" diff --git a/options.html b/options.html index c658885..eb7bd75 100644 --- a/options.html +++ b/options.html @@ -30,7 +30,7 @@ - +