您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
View match result in advance
当前为
// ==UserScript== // @name MatchResult-Review Script // @namespace https://gf.qytechs.cn/users/198348 // @version 0.0.1 // @description View match result in advance // @author TM // @include http://trophymanager.com/matches/* // @include https://trophymanager.com/matches/* // ==/UserScript== function insertBefore(el, referenceNode) { referenceNode.parentNode.insertBefore(el, referenceNode); } function insertAfter(el, referenceNode) { referenceNode.parentNode.insertBefore(el, referenceNode.nextSibling); } function showMatchResult() { var resultDiv = document.createElement('div'); var matchID = location.href.match(/([^\/]*)\/*$/)[1]; var xhr = new XMLHttpRequest(); var url = 'https://trophymanager.com/ajax/match.ajax.php?id=' + matchID; resultDiv.className = 'main_center'; xhr.open('GET', url, true); xhr.send(); xhr.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { var data = JSON.parse(this.responseText); var homeClub = data.club.home.club_name; var awayClub = data.club.away.club_name; var report = data.report; var scoreData = report[Object.keys(report).sort().pop()]; var finalText = scoreData[0].chance.text[0]; var finalScore = 'vs'; if (report) { var finalTxtArray = finalText.toString().split(' '); finalTxtArray.forEach(function (str) { if (str.indexOf('-') > -1) { finalScore = str; } }); } var htmlTxt = '<div style="width:100%;text-align:center;margin-top:10px;padding:10px;background-color:#000000;font-family:arial;font-size:15px;font-weight:bold;">'; htmlTxt += homeClub + '<span style="padding-left:10px;padding-right:10px;color:#CF0;">' + finalScore + '</span>' + awayClub + '</div>' resultDiv.innerHTML = htmlTxt; var mainCenters = document.getElementsByClassName('main_center'); var lastMainDiv = mainCenters[mainCenters.length - 1]; if (lastMainDiv) { insertBefore(resultDiv, lastMainDiv); } } }; } (function() { 'use strict'; showMatchResult(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址