百鸽裁定按钮重定向为dev分支

修改 ygocdb.com 上“裁定”链接中的 latest 为 dev

// ==UserScript==
// @name         百鸽裁定按钮重定向为dev分支
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  修改 ygocdb.com 上“裁定”链接中的 latest 为 dev
// @author       coccvo
// @match        https://ygocdb.com/*
// @icon         https://ygocdb.com/favicon.ico
// @grant        none
// @run-at       document-idle
// @license      MIT
// ==/UserScript==

(function() {
  // 获取所有"裁定"按钮元素
  const Buttons = document.querySelectorAll('a[href*="ocg-rule.readthedocs.io/zh_CN/latest/"]');

  // 遍历每个按钮并修改链接
 Buttons.forEach(button => {
    const latestlink = button.href;
    // 将"latest"替换为"dev"(不区分大小写)
    const devlink = latestlink.replace(/latest/i, 'dev');
    button.href = devlink;
  });
})();