GC World Challenge Helper

Highlights rows that have unmatched scores in GC's World Challenges.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         GC World Challenge Helper
// @namespace    https://greasyfork.org/en/users/1175371/
// @version      0.3
// @description  Highlights rows that have unmatched scores in GC's World Challenges.
// @author       sanjix
// @match        https://www.grundos.cafe/games/challenges/current/?id=*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=grundos.cafe
// @grant        none
// @license      MIT
// ==/UserScript==

var rows = document.querySelectorAll('.wc-score-table tbody tr');
rows.forEach((row) => {
  var tally = parseInt(row.children[1].textContent);
  var scores = parseInt(row.children[5].textContent);
  if (tally != scores) {
    row.classList.add('unmatched');
  }
});

var odds = document.querySelectorAll('.wc-score-table tbody tr:nth-child(odd).unmatched');
var evens = document.querySelectorAll('.wc-score-table tbody tr:nth-child(even).unmatched');

odds.forEach((row) => {
    row.style.backgroundColor = 'lightblue';
});
evens.forEach((row) => {
    row.style.backgroundColor = 'rgba(173, 216, 230, 0.57)';
});