Skip to content

Commit

Permalink
fix dark mode on steam #26
Browse files Browse the repository at this point in the history
  • Loading branch information
cvzi committed Jan 29, 2024
1 parent e8fb756 commit a521b43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Show_metacritic_ratings.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js
// @license GPL-3.0-or-later; https://www.gnu.org/licenses/gpl-3.0.txt
// @antifeature tracking When a metacritic rating is displayed, we may store the url of the current website and the metacritic url in our database. Log files are temporarily retained by our database hoster Cloudflare Workers® and contain your IP address and browser configuration.
// @version 100
// @version 101
// @connect metacritic.com
// @connect met.acritic.workers.dev
// @connect imdb.com
Expand Down Expand Up @@ -1966,7 +1966,7 @@ function showHoverInfo (response, orgMetaUrl) {
if (!frameStatus) { // Loading frame content failed.
// Directly inject the html without an iframe (this may break the site or the metacritic)
console.debug('ShowMetacriticRatings: Loading iframe content failed. Injecting directly.')
$('head').append(`<style>${css}</style>`)
$('head').append(`<style>${css}\n\n@media (prefers-color-scheme: dark) {\n${cssDark}\n}\n</style>`)
const noframe = $(`<div style="border:0px solid; display:block; position:relative; border-radius:0px; padding:0px; margin:0px; box-shadow:none;" class="hover_div" id="hover_div">
<div class="hover_content">${html}</div>
</div>`)
Expand Down

0 comments on commit a521b43

Please sign in to comment.