// ==UserScript== // @name NGA优化摸鱼体验插件-信息加强 // @namespace https://github.com/DelCrona/NGA_checkInfo // @version 1.0.1 // @author DelCrona // @description 尝试修复一下获取属地回复等信息(希望作者早日修复) // @license MIT // @require https://cdn.staticfile.net/jquery/3.4.0/jquery.min.js // @require https://cdn.staticfile.net/spectrum/1.8.0/spectrum.js // @require https://cdn.staticfile.net/localforage/1.10.0/localforage.min.js // @require https://cdn.staticfile.net/echarts/5.4.2/echarts.min.js // @match *://bbs.nga.cn/* // @match *://ngabbs.com/* // @match *://nga.178.com/* // @match *://g.nga.cn/* // @grant GM_registerMenuCommand // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue // @grant GM_listValues // @grant unsafeWindow // @run-at document-start // @inject-into content // @downloadURL none // ==/UserScript== (function (registerPlugin) { 'use strict'; registerPlugin({ name: 'checkInfo', // 插件唯一KEY title: '信息增强', // 插件名称 desc: '修复查询端口被封的问题', // 插件说明 settings: [{ key: 'textInput', title: '占位符', desc: '描述信息\n描述信息', }], beforeSaveSettingFunc(setting) { console.log(setting) // return 值则不会保存,并抛出错误 return '拦截' }, preProcFunc() { console.log('已运行: preProcFunc()') }, initFunc() { console.log('已运行: initFunc()') console.log('插件ID: ', this.pluginID) console.log('插件配置: ', this.pluginSettings) console.log('主脚本: ', this.mainScript) console.log('主脚本引用库: ', this.mainScript.libs) }, postProcFunc() { }, renderThreadsFunc($el) { }, renderFormsFunc($el) { const uid = parseInt($el.find('[name="uid"]').text()) var userInfo = null $.ajax(`https://${window.location.host}/nuke.php?func=ucp&uid=${uid}`) .then(html => { var parser = new DOMParser(); var htmlDoc = parser.parseFromString(html, "text/html"); // 查找包含__UCPUSER项的