🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Greasy Fork is available in English.

ATP TestScriptFunction

Test skriptu

Ten skrypt nie powinien być instalowany bezpośrednio. Jest to biblioteka dla innych skyptów do włączenia dyrektywą meta // @require https://update.greasyfork.org/scripts/483757/1305569/ATP%20TestScriptFunction.js

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

function atpTourChecker() {
'use strict';
var a = document.querySelectorAll('.stats-cta > a:nth-child(1)');
var year = document.querySelector('.date-location > span:last-child').textContent.trim().match(/[0-9]{4}$/);
var tourID = window.location.href.match(/\/([0-9]+)\//)[1];
var tourTypeMatch = document.querySelector('.atp_draw > div > ul > li.active > a').textContent.trim();
var tourType;
if (tourTypeMatch == "Singles") {
tourType = "ms";}
if (tourTypeMatch == "Doubles") {
tourType = "md";}
if (tourTypeMatch == "Qual Singles") {
tourType = "qs";}
if (tourTypeMatch == "Qual Doubles") {
tourType = "qd";}

var matchCount = a.length;
var there_are_12 = ["008", "009", "010", "011", "012", "013", "014", "015", "004", "005", "006", "007"];
var there_are_31 = ["016", "017", "018", "019", "020", "021", "022", "023", "024", "025", "026", "027", "028", "029", "030", "031", "008", "009", "010", "011", "012", "013", "014", "015", "004", "005", "006", "007", "002", "003", "001"];
var there_are_63 = ["032", "033", "034", "035", "036", "037", "038", "039", "040", "041", "042", "043", "044", "045", "046", "047", "048", "049", "050", "051", "052", "053", "054", "055", "056", "057", "058", "059", "060", "061", "062", "063", "016", "017", "018", "019", "020", "021", "022", "023", "024", "025", "026", "027", "028", "029", "030", "031", "008", "009", "010", "011", "012", "013", "014", "015", "004", "005", "006", "007", "002", "003", "001"];
var there_are_15 = ["008", "009", "010", "011", "012", "013", "014", "015", "004", "005", "006", "007", "002", "003", "001"];
var there_are_3 = ["002", "003", "001"];
var there_are_18 = ["016", "017", "018", "019", "020", "021", "022", "023", "024", "025", "026", "027", "008", "009", "010", "011", "012", "013"];
var there_are_21 = ["016", "017", "018", "019", "020", "021", "022", "023", "024", "025", "026", "027", "028", "029", "009", "010", "011", "012", "013", "014", "015"];
var there_are_36 = ["032", "033", "034", "035", "036", "037", "038", "039", "040", "041", "042", "043", "044", "045", "046", "047", "048", "049", "050", "051", "052", "053", "054", "055", "016", "017", "018", "019", "020", "021", "022", "023", "024", "025", "026", "027"];
var there_are_127 = ["064", "065", "066", "067", "068", "069", "070", "071", "072", "073", "074", "075", "076", "077", "078", "079", "080", "081", "082", "083", "084", "085", "086", "087", "088", "089", "090", "091", "092", "093", "094", "095", "096", "097", "098", "099", "100", "101", "102", "103", "104", "105", "106", "107", "108", "109", "110", "111", "112", "113", "114", "115", "116", "117", "118", "119", "120", "121", "122", "123", "124", "125", "126", "127", "032", "033", "034", "035", "036", "037", "038", "039", "040", "041", "042", "043", "044", "045", "046", "047", "048", "049", "050", "051", "052", "053", "054", "055", "056", "057", "058", "059", "060", "061", "062", "063", "016", "017", "018", "019", "020", "021", "022", "023", "024", "025", "026", "027", "028", "029", "030", "031", "008", "009", "010", "011", "012", "013", "014", "015", "004", "005", "006", "007", "002", "003", "001"];

var m12 = there_are_12.length
var m31 = there_are_31.length
var m63 = there_are_63.length
var m15 = there_are_15.length
var m3 = there_are_3.length
var m18 = there_are_18.length
var m21 = there_are_21.length
var m36 = there_are_36.length
var m127 = there_are_127.length
var list;
if (matchCount == m12) {
list = there_are_12;}
if (matchCount == m31) {
list = there_are_31;}
if (matchCount == m63) {
list = there_are_63;}
if (matchCount == m15) {
list = there_are_15;}
if (matchCount == m3) {
list = there_are_3;}
if (matchCount == m18) {
list = there_are_18;}
if (matchCount == m21) {
list = there_are_21;}
if (matchCount == m36) {
list = there_are_36;}
if (matchCount == m127) {
list = there_are_127;}

for (var i = 0; i < matchCount; i++) {
        var value = "/en/scores/stats-centre/live/" + year + "/" + tourID + "/" + tourType + list[i];
        a[i].setAttribute("href", value);
    }
}