Greasy Fork

Greasy Fork is available in English.

Mcmod下载搜索脚本

一键跳转到CourseForge,全速下载模组!

目前为 2021-05-16 提交的版本。查看 最新版本

// ==UserScript==
// @name         Mcmod下载搜索脚本
// @namespace    https://blog.csdn.net/Huuc6
// @version      0.1
// @description  一键跳转到CourseForge,全速下载模组!
// @author       huuc
// @match        *://www.mcmod.cn/class/*
// @icon         https://utool-picbed-1304937021.cos.ap-nanjing.myqcloud.com/MachineLearning/1621152891017.png
// @require      http://libs.baidu.com/jquery/2.0.0/jquery.min.js
// @grant        GPL-2.0
// ==/UserScript==

(function() {
    'use strict';
    //本脚本通过读取模组页面英文名,跳转到https://files.xmdhs.top/curseforge进行搜索,简单方便
    $('.common-link-icon-frame-style-3:last').append('<li><a id="addition" data-toggle="tooltip" data-original-title="FakeCurseForge" target="_blank" rel="nofollow noreferrer" href="#"><svg class="common-mcicon common-linkicon common-linkicon-github" aria-hidden="true"><use xlink:href="#common-icon-link"></use></svg></a><span title="FakeCurseForge" class="name">FakeCourseForge</span></li>')
    let ModName = $('.class-title h4').text()
    let trueurl = 'https://files.xmdhs.top/curseforge/s?q='+ ModName // 注意,此处不能用www.baidu.com这样的url,必须用//baidu.com这样的形式
    $('#addition').attr("href",trueurl)
})();