N3RDN/JN/EXT/userScripts/dandantu.user.js
2025-01-12 17:40:42 +08:00

45 lines
1.4 KiB
JavaScript

// ==UserScript==
// @name maccms-mxonepro
// @namespace gmspider
// @version 2025.1.11
// @description maccms GMSpider
// @author Luomo
// @match *://*/*
// @require https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.slim.min.js
// @require https://cdn.jsdelivr.net/gh/CatVodSpider-GM/SFW-Spiders@main/Spiders-Lib/maccms10.js
// @grant unsafeWindow
// ==/UserScript==
console.log(JSON.stringify(GM_info));
(function () {
const GMSpiderArgs = {};
if (typeof GmSpiderInject !== 'undefined') {
let args = JSON.parse(GmSpiderInject.GetSpiderArgs());
GMSpiderArgs.fName = args.shift();
GMSpiderArgs.fArgs = args;
} else {
GMSpiderArgs.fName = "homeContent";
GMSpiderArgs.fArgs = [true];
}
Object.freeze(GMSpiderArgs);
const GmSpider = MacCmsGMSpider({
configPicUserAgent: false,
homeContent: {
category: {
select: ".navbar-item",
slice: [1, 5]
}
},
playerContent: {
OkPlayer: true
}
});
$(document).ready(function () {
const result = GmSpider[GMSpiderArgs.fName](...GMSpiderArgs.fArgs);
console.log(result);
if (typeof GmSpiderInject !== 'undefined') {
GmSpiderInject.SetSpiderResult(JSON.stringify(result));
}
});
})();