feat: iframe postMessage bridge, screenshot SOP, quick start pdf

This commit is contained in:
Liang Jiaqing
2026-02-26 14:12:10 +08:00
parent 63d9bea9b2
commit 06f7f630e4
4 changed files with 6 additions and 2 deletions

BIN
.gitignore vendored

Binary file not shown.

BIN
QUICK_START.pdf Normal file

Binary file not shown.

View File

@@ -21,7 +21,7 @@
const log_prefix = "ljq_driver: "; const log_prefix = "ljq_driver: ";
if (window.self !== window.top) { 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; return;
} }

View File

@@ -44,4 +44,8 @@ fetch('PDF_URL').then(r=>r.blob()).then(b=>{
## Cookie提取(含HttpOnly) ## Cookie提取(含HttpOnly)
前提:需先安装`assets/cookie_grabber/`扩展 前提:需先安装`assets/cookie_grabber/`扩展
机制:注入`id="__ljqcg__"`的div→扩展检测后自动将完整cookie写回该元素textContent含HttpOnly 机制:注入`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切标签页只能开新的来保证前台