Emmet's Direct Factorio Mods Downloader 2024

Directly download any of the latest mods from https://mods.factorio.com with just one click. No authorization needed.

目前为 2023-12-26 提交的版本。查看 最新版本

// ==UserScript==
// @name         Emmet's Direct Factorio Mods Downloader 2024
// @namespace    https://re146.dev/
// @version      1.2.1
// @description  Directly download any of the latest mods from https://mods.factorio.com with just one click. No authorization needed.
// @author       Discord @EmmetPotet
// @match        https://mods.factorio.com/mod/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=re146.dev/factorio/mods
// @grant        none
// @license      MIT
// ==/UserScript==

(async function() {
    'use strict';

    const modUrlMatch = location.href.match(/^https:\/\/mods\.factorio\.com\/mod\/([^\/]+)/);
    if (!modUrlMatch) return;
    const modName = modUrlMatch[1];
    const buttonWrapper = document.getElementsByClassName('button-green text-center');
    const button = document.getElementsByClassName('btn mod-download-button btn-download')[0];
    let modVersion;
    for (const dd of document.querySelectorAll('dt')) {
        if (dd.innerHTML == "Latest Version:") {
            modVersion = dd.nextElementSibling.innerHTML.trim().split(" ")[0];
            button.childNodes[1].classList.remove("disabled");
            button.childNodes[1].setAttribute('href', `https://mods-storage.re146.dev/${modName}/${modVersion}.zip?anticache=${Math.random}`);
            button.childNodes[1].setAttribute('title', `You don't need to own Factorio to download mods. ;3`);
        }
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址