让你的飞书更好用

破解飞书的复制限制

  1. // ==UserScript==
  2. // @name 让你的飞书更好用
  3. // @namespace https://bytedance.com
  4. // @version 0.1
  5. // @description 破解飞书的复制限制
  6. // @author alwaysday1
  7. // @match *://bytedance.feishu.cn/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=feishu.cn
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12. (function () {
  13. XMLHttpRequest.prototype._open = XMLHttpRequest.prototype.open;
  14. XMLHttpRequest.prototype.open = function (...args) {
  15. const [ method, url ] = args;
  16. if (method !== 'POST' || !url.includes('space/api/suite/permission/document/actions/state/')) {
  17. return this._open(...args);
  18. }
  19.  
  20. this.addEventListener("readystatechange", function() {
  21. if (this.readyState !== 4) return;
  22. let response = this.response;
  23. try {
  24. response = JSON.parse(response);
  25. } catch(e) {};
  26. console.log('debug:', response);
  27. if (response.data.actions.copy === 1) {
  28. return;
  29. }
  30.  
  31. response.data.actions.copy = 1;
  32.  
  33. Object.defineProperty(this, 'response', {
  34. get() {
  35. return response;
  36. }
  37. });
  38. Object.defineProperty(this, 'responseText', {
  39. get() {
  40. return JSON.stringify(response);
  41. }
  42. });
  43. }, false);
  44.  
  45. return this._open(...args);
  46. };
  47. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址