Redirects href to team page on MZ World League
当前为
// ==UserScript==
// @name ManagerZone WLeague Redirect
// @version 1.0
// @description Redirects href to team page on MZ World League
// @match https://www.managerzone.com/?p=league&type=u18*
// @match https://www.managerzone.com/?p=league&type=u21*
// @match https://www.managerzone.com/?p=league&type=u23*
// @match https://www.managerzone.com/?p=league&type=world*
// @grant none
// @license MIT
// @namespace https://greasyfork.org/users/1088808
// ==/UserScript==
(function() {
function modifyLinks() {
const rows = document.querySelectorAll('.nice_table tbody tr');
if (!rows.length) {
setTimeout(modifyLinks, 100);
return;
}
for (const row of rows) {
const link = row.querySelector('a[href^="/?p=league&type="]');
if (link) {
const tid = link.href.match(/tid=(\d+)/);
if (tid) {
const newURL = `https://www.managerzone.com/?p=team&tid=${tid[1]}`;
link.href = newURL;
}
}
}
}
modifyLinks();
})();