浏览代码

Merge pull request #1380 from Siykt/feat/event-click-bot-bypass

feat: In  `debugMode` , the  `EventClick`  still cannot bypass the bot detection.
Ahmad Kholid 1 年之前
父节点
当前提交
d46e0c7470
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/content/blocksHandler/handlerEventClick.js

+ 5 - 0
src/content/blocksHandler/handlerEventClick.js

@@ -1,4 +1,5 @@
 import { sendMessage } from '@/utils/message';
+import { sleep } from '@/utils/helper';
 import { getElementPosition, simulateClickElement } from '../utils';
 import handleSelector from '../handleSelector';
 
@@ -27,7 +28,11 @@ function eventClick(block) {
             return sendMessage('debugger:send-command', payload, 'background');
           };
 
+          // bypass the bot detection.
+          await executeCommand('mouseMoved');
+          await sleep(100);
           await executeCommand('mousePressed');
+          await sleep(100);
           await executeCommand('mouseReleased');
 
           return;