Greasy Fork

Greasy Fork is available in English.

Bet365 Colors

färglatt :D

当前为 2022-04-24 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Bet365 Colors
// @namespace    https://crack.cocaine
// @version      1.0.0
// @description  färglatt :D
// @author       Mathias
// @match        https://www.bet365.com/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=bet365.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    console.log("Bet365: Initiating now.. :D");
    setInterval(() => {
        console.log("Bet365: Colorizing..");
        let list = document.querySelectorAll(".myb-BetParticipant.myb-OpenBetParticipant.myb-OpenBetParticipant_MiniMatchLiveEnabled");
        list.forEach((el) => {
            let bettedOnEl = el.querySelector(".myb-BetParticipant_ParticipantSpan");
            let bettedOn = bettedOnEl.innerText;
            let teams = el.querySelector(".myb-BetParticipant_FixtureName").innerText.split("@");
            let score = el.querySelector(".myb-OpenBetScores_Score").innerText.split("-");
            if(bettedOn == teams[0]) {
                // Första score är det man bettat på
                if(score[0] > score[1])
                    bettedOnEl.style.setProperty("color", "#5cf278", "important");
                else if(score[0] == score[1])
                    bettedOnEl.style.setProperty("color", "#fcd123", "important");
                else
                    bettedOnEl.style.setProperty("color", "#f0565b", "important")
            } else {
                // Första score är det man bettat på
                if(score[0] > score[1])
                    bettedOnEl.style.setProperty("color", "#f0565b", "important");
                else if(score[0] == score[1])
                    bettedOnEl.style.setProperty("color", "#fcd123", "important");
                else
                    bettedOnEl.style.setProperty("color", "#5cf278", "important")
            }
        });
    }, 1000);
    // Your code here...
})();