500彩票网初始亚盘水位高亮显示

500彩票网初始亚盘水位高亮显示,方便统计各个公司的预测命中率。

目前为 2025-03-08 提交的版本。查看 最新版本

// ==UserScript==
// @name         500彩票网初始亚盘水位高亮显示
// @namespace    http://dol.freevar.com/
// @version      0.1
// @description  500彩票网初始亚盘水位高亮显示,方便统计各个公司的预测命中率。
// @author       Dolphin
// @run-at       document-idle
// @match        https://odds.500.com/fenxi/yazhi*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
  'use strict';
  document.querySelectorAll('#datatb tr td:nth-child(5)').forEach(initialCell => {
    // 获取当前列的表格行中的数值单元格
    const tableRow = initialCell.querySelector('tr');
    if (!tableRow) return;
    
    // 获取第一个和第三个td元素(数值单元格)
    const firstValueCell = tableRow.querySelector('td:first-child');
    const secondValueCell = tableRow.querySelector('td:nth-child(3)');
    
    // 提取数值并转换为浮点数
    const value1 = parseFloat(firstValueCell.textContent);
    const value2 = parseFloat(secondValueCell.textContent);
    
    // 比较数值并设置背景颜色
    if (value1 < value2) {
        firstValueCell.style.backgroundColor = '#90EE90'; // 绿色
        secondValueCell.style.backgroundColor = '#FFC0CB'; // 红色
    } else if (value1 > value2) {
        firstValueCell.style.backgroundColor = '#FFC0CB'; // 红色
        secondValueCell.style.backgroundColor = '#90EE90'; // 绿色
    }
    // 相等则不处理
});
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址