MCPcopy Create free account
hub / github.com/XIU2/UserScript / EventXMLHttpRequest

Function EventXMLHttpRequest

Lanzou-Enhanced.user.js:590–600  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

588
589 // 监听 XMLHttpRequest 事件并执行
590 function EventXMLHttpRequest() {
591 var _send = mainframe.XMLHttpRequest.prototype.send
592 function sendReplacement(data) {
593 setTimeout(fileMore, 200); // 自动显示更多文件
594 setTimeout(fileSha, 200); // 自动打开分享链接(点击文件时)
595 setTimeout(rightClickMenu, 500); // 右键文件显示菜单
596 setTimeout(getLastFolderID, 200); // 获取上个文件夹 ID(用于浏览器后退事件)
597 return _send.apply(this, arguments);
598 }
599 mainframe.XMLHttpRequest.prototype.send = sendReplacement;
600 }
601
602
603 // 监听并修改右键菜单 [外链分享地址] 为 [复制并打开分享链接] / [复制分享链接] / [打开分享链接] 之一

Callers 1

iframeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected