Mcmod下载搜索脚本

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

目前為 2021-05-16 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==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)
})();