zhepama commited on
Commit
65703f1
·
verified ·
1 Parent(s): b0b7245

Update src/index.ts

Browse files
Files changed (1) hide show
  1. src/index.ts +1 -24
src/index.ts CHANGED
@@ -115,30 +115,7 @@ async function initGensparkPage(cookies?: any[]) {
115
  'sec-ch-ua-platform': '"Windows"'
116
  });
117
 
118
- // 设置随机鼠标移动和滚动行为
119
- await gensparkPage.addInitScript(() => {
120
- // 模拟鼠标移动
121
- const originalMouseMove = window.MouseEvent;
122
- const randomMouseMovement = () => {
123
- const event = new MouseEvent('mousemove', {
124
- 'view': window,
125
- 'bubbles': true,
126
- 'cancelable': true,
127
- 'clientX': Math.floor(Math.random() * window.innerWidth),
128
- 'clientY': Math.floor(Math.random() * window.innerHeight)
129
- });
130
- document.dispatchEvent(event);
131
- };
132
-
133
- // 随机时间触发鼠标移动
134
- if (document.readyState === 'complete') {
135
- setInterval(randomMouseMovement, Math.floor(Math.random() * 2000 + 1000));
136
- } else {
137
- window.addEventListener('load', () => {
138
- setInterval(randomMouseMovement, Math.floor(Math.random() * 2000 + 1000));
139
- });
140
- }
141
- });
142
  // 首次加载页面
143
  await gensparkPage.goto('https://www.genspark.ai', {
144
  waitUntil: 'networkidle',
 
115
  'sec-ch-ua-platform': '"Windows"'
116
  });
117
 
118
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  // 首次加载页面
120
  await gensparkPage.goto('https://www.genspark.ai', {
121
  waitUntil: 'networkidle',