您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Changes all the links for download on https://mods.factorio.com/ if you haven't authorized
// ==UserScript== // @name Factorio Free Mods Downloader 2 // @namespace https://re146.dev // @version 2.0 // @description Changes all the links for download on https://mods.factorio.com/ if you haven't authorized // @author Kopie_Miya & re146 // @match https://mods.factorio.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=re146.dev/factorio/mods // @grant none // ==/UserScript== (function() { 'use strict'; const buttons = document.getElementsByClassName('button-green'); for (const button of buttons) { if (button.innerText.trim() !== 'Download') { continue; } if (!button.getAttribute('href').startsWith('/login?next=')) { continue; } if (button.parentElement.tagName === 'DIV') { const url =button.getAttribute('href').substring(17); const modName =url; button.innerText = 'Download from re146.dev'; button.setAttribute('target', '_blank'); button.setAttribute('href', `https://re146.dev/factorio/mods/en#https://mods.factorio.com/mod/${modName}`); } } })();