diff --git a/.gitignore b/.gitignore index c8ca6bf..e6a16ee 100644 Binary files a/.gitignore and b/.gitignore differ diff --git a/QUICK_START.pdf b/QUICK_START.pdf new file mode 100644 index 0000000..ab77acc Binary files /dev/null and b/QUICK_START.pdf differ diff --git a/assets/ljq_web_driver.user.js b/assets/ljq_web_driver.user.js index dda7886..1cad405 100644 --- a/assets/ljq_web_driver.user.js +++ b/assets/ljq_web_driver.user.js @@ -21,7 +21,7 @@ const log_prefix = "ljq_driver: "; if (window.self !== window.top) { - console.log(log_prefix + '在iframe中不执行'); + window.addEventListener('message',e=>{if(e.data?.type==='ljq_exec'){try{let r=eval(e.data.code);parent.postMessage({type:'ljq_result',id:e.data.id,result:String(r)},'*')}catch(err){parent.postMessage({type:'ljq_result',id:e.data.id,error:err.message},'*')}}}); return; } diff --git a/memory/tmwebdriver_sop.md b/memory/tmwebdriver_sop.md index 2dfe868..d5fb9dc 100644 --- a/memory/tmwebdriver_sop.md +++ b/memory/tmwebdriver_sop.md @@ -44,4 +44,8 @@ fetch('PDF_URL').then(r=>r.blob()).then(b=>{ ## Cookie提取(含HttpOnly) 前提:需先安装`assets/cookie_grabber/`扩展 -机制:注入`id="__ljqcg__"`的div→扩展检测后自动将完整cookie写回该元素textContent(含HttpOnly) \ No newline at end of file +机制:注入`id="__ljqcg__"`的div→扩展检测后自动将完整cookie写回该元素textContent(含HttpOnly)## 验证码/页面视觉截图 +- 优先:JS `canvas.toDataURL()` 直接拿base64(验证码是canvas/img时最干净,无需截屏) +- 备选:`window.open(location.href,'_blank')` 前台开新标签→win32截图→完后close + - GM_openInTab在web_execute_js不可用(非油猴上下文) + - 浏览器无JS API切标签页,只能开新的来保证前台 \ No newline at end of file