Permalink
Browse files

UPDATE: Metacritic user score

I think the side by side color comparison is important
  • Loading branch information...
1 parent f50077c commit 58d56ec0b53b8b9227e66a4946a2225b90a50622 @jshackles committed Dec 9, 2016
Showing with 69 additions and 8 deletions.
  1. +4 −1 changelog.txt
  2. +59 −0 css/enhancedsteam.css
  3. +6 −7 enhancedsteam.js
View
@@ -1,9 +1,12 @@
v9.1
-----
+ Added DRM detection for games utilizing Denuvo Antitamper DRM
++ Added home page customization with the ability to hide particular sections
+ Added an option as to whether you would like your wallet balance show in the header of community pages
+: Updated the quick sell and instant sell buttons to use the new inventory data layout Valve created
: Updated external site icons with higher resolution versions
-: Fixed a bug that caused some "season packs" to show a split calculation
+: Fixed a bug that caused some "season packs" to incorrectly show a split calculation
+: Fixed a bug where metacritic user scores weren't displaying correctly with the new layout
v9.0.1
View
@@ -2098,3 +2098,62 @@ input[type=checkbox].es_dlc_selection:checked + label {
margin-top: -66px !important;
padding-top: 24px !important;
}
+
+/***************************************
+ * MetaCritic User Scores
+ * add_metacritic_userscore()
+ **************************************/
+#game_area_userscore {
+ margin-top: 6px;
+ padding-top: 10px;
+ clear: both;
+}
+
+#game_area_userscore .score {
+ width: 50px;
+ height: 50px;
+ line-height: 50px;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #FFFFFF;
+ font-size: 25px;
+ text-align: center;
+ float: left;
+}
+
+#game_area_userscore .score.high {
+ background-color: #66CC33;
+}
+
+#game_area_userscore .score.medium {
+ background-color: #FFCC33;
+}
+
+#game_area_userscore .score.low {
+ background-color: #FF0000;
+}
+
+#game_area_userscore .logo {
+ background-image: url(/public/images/v6/mc_logo_no_text.png);
+ background-repeat: no-repeat;
+ height: 35px;
+ width: 35px;
+ margin-left: 10px;
+ margin-top: 10px;
+ float: left;
+}
+
+#game_area_userscore .wordmark {
+ float: left;
+ width: 180px;
+}
+
+#game_area_userscore .metacritic {
+ font-family: "Motiva Sans", Sans-serif;
+ font-weight: bold; /* bold */
+ color: #FFFFFF;
+ margin-left: 2px;
+ font-size: 26px;
+ line-height: 26px;
+ margin-top: 12px;
+ float: left;
+}
View
@@ -4222,7 +4222,6 @@ function hide_activity_spam_comments() {
// Add Metacritic user scores to store page
function add_metacritic_userscore() {
- // Add metacritic user reviews
storage.get(function(settings) {
if (settings.showmcus === undefined) { settings.showmcus = true; storage.set({'showmcus': settings.showmcus}); }
if (settings.showmcus) {
@@ -4231,12 +4230,12 @@ function add_metacritic_userscore() {
if (data.userscore) {
var metauserscore = data.userscore * 10;
if (!isNaN(metauserscore)) {
- $("#game_area_metascore").addClass("es_area_userscore");
- $("#game_area_metalink").after(`
- <div id="game_area_userscore">
- ${ localized_strings.user_score }: <span>${ metauserscore }/100</span>
- </div>
- `);
+ $("#game_area_metascore").after("<div id='game_area_userscore'></div>");
+ var rating;
+ if (metauserscore >= 75) { rating = "high"; } else {
+ if (metauserscore >= 50) { rating = "medium"; } else { rating = "low"; }
+ }
+ $("#game_area_userscore").append("<div class='score " + rating + "'>" + metauserscore + "</div><div class='logo'></div><div class='wordmark'><div class='metacritic'>" + localized_strings.user_score + "</div></div>");
}
}
});

0 comments on commit 58d56ec

Please sign in to comment.