任务恢复:智能中断任务恢复 - Openclaw Skills

作者:互联网

2026-04-05

AI教程

什么是 任务恢复?

任务恢复(Task Resume)是一款先进的状态管理技能,旨在消除因上下文切换引起的摩擦。在任何复杂的 AI 智能体环境中,用户经常在当前任务完成前提出新请求。该技能通过将中断上下文持久化到工作区全局队列,确保智能体不会丢失其原始目标。通过将其集成到 Openclaw Skills 中,开发人员可以确保高保真地恢复任务状态,包括验收标准和完成工作所需的准确后续步骤。

该技能基于“默认入队”哲学运行,这意味着除非明确说明,否则它会将大多数主题切换视为潜在中断。这为高优先级任务提供了安全保障,防止它们在繁忙的开发阶段被边缘化或遗忘。

下载入口:https://github.com/openclaw/skills/tree/main/skills/richardsun700/task-resume

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install task-resume

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 task-resume。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

任务恢复 应用场景

  • 当用户切换到新的无关请求时,自动保存进度。
  • 在多智能体或多会话协作期间管理任务优先级。
  • 防止在临时上下文切换或系统触发的中断期间丢失工作。
  • 在完成高优先级热修复或查询后立即恢复后台任务。
任务恢复 工作原理
  1. 智能体识别具有未完成验收标准的活动任务。
  2. 收到无关的用户消息后,智能体将任务上下文持久化到共享的全局队列文件中。
  3. 智能体处理新的中断或优先级请求。
  4. 活动任务完成后,智能体自动从队列中弹出最早的项目。
  5. 智能体恢复之前的上下文并继续执行,并向用户宣告任务恢复。

任务恢复 配置指南

要将此功能集成到您的 Openclaw Skills 工作区,请确保配置如下:

  1. memory/task-resume-queue.json 初始化全局队列存储。
  2. 部署用于处理队列操作的辅助脚本:
# 检查任务队列的当前状态
python3 skills/task-resume/scripts/task_resume_queue.py status
  1. (可选)为看门狗自动继续功能配置每 30 分钟运行一次的 cron 任务。

任务恢复 数据架构与分类体系

该技能通过统一的 JSON 模式管理任务状态,允许主智能体和克隆智能体之间进行跨会话可见性。

属性 描述
title 中断任务的名称
context 已完成工作和紧接后续步骤的详细快照
acceptance 任务定义的成功标准
source 发起频道或用户身份
session 用于上下文恢复的唯一会话密钥或聊天 ID
name: task-resume
description: Automatic interrupted-task resume workflow with queueing and recovery. Use when a user asks to resume interrupted work after temporary context switches, protect priority tasks from drift, or enforce "finish current task then auto-resume previous interrupted task" behavior.

Task Resume

Use this skill to ensure interrupted tasks are recovered automatically.

Defaults (MANDATORY)

  • Make interruption enqueue the default behavior.
  • On any non-explicit context switch, auto-enqueue the active unfinished task.
  • Enqueue at message-time (immediately when interruption is detected), not only on periodic checks.
  • Use one shared queue file for all sessions/clones so the view is unified.

Rules

  • Treat user-explicit commands (cancel, pause, change priority, do it tomorrow) as overrides.
  • Treat all other topic switches as potential interruptions.
  • Before switching topics, persist interruption context to queue.
  • After completing the active task, immediately resume the oldest queued interrupted task.
  • If queue is empty, do nothing.

Shared Queue Storage (cross-session)

  • Canonical queue file: memory/task-resume-queue.json
  • This file is workspace-global and shared across main + clone + group sessions.
  • Always pass source with session/channel identity.
  • Use helper script: scripts/task_resume_queue.py

Interruption Detection

Consider a task interrupted when all are true:

  1. There is an active task with unfinished acceptance criteria.
  2. A new user request is unrelated to finishing that active task.
  3. User did not explicitly cancel/pause/defer the active task.

Message-Time Enforcement (required)

Before handling every new user message:

  1. Check whether an active task exists and is unfinished.
  2. If the incoming message is an unrelated request and no explicit override is present, enqueue immediately.
  3. Only then switch to the new request.

This prevents queue misses caused by timing gaps.

Log-based Recovery (ENOENT-safe)

When recovery needs session .jsonl context, use:

python3 skills/task-resume/scripts/task_resume_queue.py recover r
  --log "~/.openclaw/agents/main/sessions/.jsonl" r
  --title "" r
  --acceptance "" r
  --source "" r
  --session ""

If the log file is missing (ENOENT), treat it as expected and continue (skipped_missing_log), do not raise alert-level failure.

On Interruption (auto-enqueue)

Run immediately at interruption detection:

python3 skills/task-resume/scripts/task_resume_queue.py add r
  --title "" r
  --context "" r
  --acceptance "" r
  --source "" r
  --session ""

Then acknowledge briefly: queued + will auto-resume.

On Active Task Completion (resume)

Run:

python3 skills/task-resume/scripts/task_resume_queue.py pop
  • If one item is returned, resume it immediately and announce: Resuming previously interrupted task: </CODE>.</LI> <LI>If empty, continue normal flow.</LI></UL> <H2 id=unified-view>Unified View</H2> <P>Run:</P><PRE><CODE class=language-bash>python3 skills/task-resume/scripts/task_resume_queue.py status </CODE></PRE> <P>This returns total queue count + grouped counts by source/session.</P> <H2 id=guardrails>Guardrails</H2> <UL> <LI>Never drop queued tasks silently.</LI> <LI>Always include next-step quality context when enqueueing.</LI> <LI>Deduplicate: if same task title and near-identical context exists in queue, update timestamp instead of appending.</LI> <LI>Keep queue max size 30; discard oldest overflow items after logging to <CODE>memory/YYYY-MM-DD.md</CODE>.</LI></UL> <H2 id=watchdog-auto-continue-heartbeatcron>Watchdog Auto-Continue (Heartbeat/Cron)</H2> <P>When users require "not just reminder, but auto-continue execution", add a watchdog cron policy:</P> <UL> <LI>Run every 30 minutes.</LI> <LI>First inspect unfinished primary task + queue status.</LI> <LI>If interrupted or no recent progress, immediately continue the next actionable step.</LI> <LI>Send concise progress each run: done / in-progress / next step + ETA.</LI> <LI>Even with no material change, send a short巡检回执("已巡检,继续执行中").</LI></UL> <P>Recommended cron shape for delivery reliability:</P> <UL> <LI>Prefer <CODE>sessionTarget="main"</CODE> + <CODE>payload.kind="systemEvent"</CODE> for user-facing continuity checks.</LI> <LI>Avoid fragile announce-only chains when delivery channel config is unstable.</LI></UL> <H2 id=daily-hygiene>Daily Hygiene</H2> <P>At least once daily:</P><PRE><CODE class=language-bash>python3 skills/task-resume/scripts/task_resume_queue.py list </CODE></PRE> <P>If stale items (>7 days), ask user whether to cancel or schedule.</P> </div> <div class="lastanext flexRow"> <a class="lastart flexRow" href="/wz/339395.html" ><span>上一篇:</span><span>简单文本格式化工具:自动化文本样式处理 - Openclaw Skills</span></a> <a class="nextart flexRow" href="/wz/339397.html" ><span>下一篇:</span><span>Password Generator Pro:安全且本地的密码工具包 - Openclaw Skills</span></a> </div> </div> <div class="dtl-xgtj"> <div class="jb-titles flexRow"> <div class="jbtle-left flexRow"><b></b><p>相关推荐</p></div> </div> <div class="tjlist flexRow"> <div class="tj-item "> <div class="tjitemd"> <div class="tjimd-top flexRow"> <a class="imdta flexRow" href="/wz/360329.html" > <img src="/jiaoben/image/noimg.png" > </a> <div class="imdt-right flexColumn"> <a class="imdtra flexRow overflowclass" href="/wz/360329.html" >Skill Flag:保护您的 AI 智能体 - Openclaw 技能安全审计</a> <a class="imdtrap flexRow overflowclass" href="/wz/360329.html" > 什么是 Skill Flag 安全扫描器? Skill Flag 是一款高性能安全审计工具,专门为保护使用 Openclaw 技能的开发者免受恶意代码和漏洞侵害而设计。通过对技能源代码进行深度静态分析,它可以 </a> </div> </div> <div class="tjimd-down flexRow"> <div class="imdd-tab flexRow"> <p class="imddt-time flexRow"><b></b><span>2026-04-14</span></p> </div> <a href="/wz/360329.html" class="imdd-more flexRow flexcenter" >立即查看</a> </div> </div> </div> <div class="tj-item "> <div class="tjitemd"> <div class="tjimd-top flexRow"> <a class="imdta flexRow" href="/wz/360327.html" > <img src="/jiaoben/image/noimg.png" > </a> <div class="imdt-right flexColumn"> <a class="imdtra flexRow overflowclass" href="/wz/360327.html" >Home Assistant:智能家居自动化与控制 - Openclaw Skills</a> <a class="imdtrap flexRow overflowclass" href="/wz/360327.html" > 什么是 Home Assistant? Home Assistant 技能允许您的 AI 代理与您的智能家居生态系统直接交互。通过利用 Home Assistant REST API,此技能能够查询设备状态并在 </a> </div> </div> <div class="tjimd-down flexRow"> <div class="imdd-tab flexRow"> <p class="imddt-time flexRow"><b></b><span>2026-04-14</span></p> </div> <a href="/wz/360327.html" class="imdd-more flexRow flexcenter" >立即查看</a> </div> </div> </div> <div class="tj-item "> <div class="tjitemd"> <div class="tjimd-top flexRow"> <a class="imdta flexRow" href="/wz/360325.html" > <img src="/jiaoben/image/noimg.png" > </a> <div class="imdt-right flexColumn"> <a class="imdtra flexRow overflowclass" href="/wz/360325.html" >代码任务生成器:自动化 AI 编码工作流 - Openclaw Skills</a> <a class="imdtrap flexRow overflowclass" href="/wz/360325.html" > 什么是 代码任务生成器? 代码任务生成器是 Openclaw Skills 集合中不可或缺的补充,旨在弥合高层实施计划与细粒度、可执行任务之间的鸿沟。通过分析来自各种来源(包括直接文本、本地文件或产品设计 </a> </div> </div> <div class="tjimd-down flexRow"> <div class="imdd-tab flexRow"> <p class="imddt-time flexRow"><b></b><span>2026-04-14</span></p> </div> <a href="/wz/360325.html" class="imdd-more flexRow flexcenter" >立即查看</a> </div> </div> </div> <div class="tj-item "> <div class="tjitemd"> <div class="tjimd-top flexRow"> <a class="imdta flexRow" href="/wz/360324.html" > <img src="/jiaoben/image/noimg.png" > </a> <div class="imdt-right flexColumn"> <a class="imdtra flexRow overflowclass" href="/wz/360324.html" >playwriter:持久化浏览器自动化与 UI 测试 - Openclaw Skills</a> <a class="imdtrap flexRow overflowclass" href="/wz/360324.html" > 什么是 playwriter? playwriter 是一种专门的自动化技能,旨在弥合无头脚本与真实浏览器环境之间的差距。通过利用持久的本地 Chrome 会话,此技能允许执行 Playwright Pag </a> </div> </div> <div class="tjimd-down flexRow"> <div class="imdd-tab flexRow"> <p class="imddt-time flexRow"><b></b><span>2026-04-14</span></p> </div> <a href="/wz/360324.html" class="imdd-more flexRow flexcenter" >立即查看</a> </div> </div> </div> </div> </div> </div> <div class="cd-right dtlcd-right"> <div class="dtl-ht"> <div class="jb-titles flexRow"> <div class="jbtle-left flexRow"><b></b><p>专题</p></div> </div> <div class="dtlht-list "> <div class="htl-item flexRow"> <div class="htmitem-left"> <div class="htiteml-top flexRow"> <a href="/wz/zt-68081.html" >#蛋仔派对</a> <span></span> </div> <a class="htiteml-down flexRow" href="/wz/zt-68081.html" >提供蛋仔派对最新官方活动解析</a> </div> <p class="htmitem-right flexRow flexcenter gz" data-id="68081" >+ 收藏</p> </div> <div class="htl-item flexRow"> <div class="htmitem-left"> <div class="htiteml-top flexRow"> <a href="/wz/zt-50161.html" >#Grok</a> <span></span> </div> <a class="htiteml-down flexRow" href="/wz/zt-50161.html" >Grok脚本资源网站,提供G</a> </div> <p class="htmitem-right flexRow flexcenter gz" data-id="50161" >+ 收藏</p> </div> <div class="htl-item flexRow"> <div class="htmitem-left"> <div class="htiteml-top flexRow"> <a href="/wz/zt-50160.html" >#Sora2</a> <span></span> </div> <a class="htiteml-down flexRow" href="/wz/zt-50160.html" >Sora2脚本资源网站,提供S</a> </div> <p class="htmitem-right flexRow flexcenter gz" data-id="50160" >+ 收藏</p> </div> <div class="htl-item flexRow"> <div class="htmitem-left"> <div class="htiteml-top flexRow"> <a href="/wz/zt-50159.html" >#通义万相</a> <span></span> </div> <a class="htiteml-down flexRow" href="/wz/zt-50159.html" >通义万相脚本资源网站,提供通</a> </div> <p class="htmitem-right flexRow flexcenter gz" data-id="50159" >+ 收藏</p> </div> <div class="htl-item flexRow"> <div class="htmitem-left"> <div class="htiteml-top flexRow"> <a href="/wz/zt-50158.html" >#海螺AI</a> <span></span> </div> <a class="htiteml-down flexRow" href="/wz/zt-50158.html" >海螺AI脚本资源网站,提供海</a> </div> <p class="htmitem-right flexRow flexcenter gz" data-id="50158" >+ 收藏</p> </div> <div class="htl-item flexRow"> <div class="htmitem-left"> <div class="htiteml-top flexRow"> <a href="/wz/zt-50157.html" >#可灵AI</a> <span></span> </div> <a class="htiteml-down flexRow" href="/wz/zt-50157.html" >可灵AI脚本资源网站,提供可</a> </div> <p class="htmitem-right flexRow flexcenter gz" data-id="50157" >+ 收藏</p> </div> </div> </div> <div class=" dtl-zt"> <div class="jb-titles flexRow"> <div class="jbtle-left flexRow"><b></b><p>最新数据</p></div> </div> <div class="wkch-downs"> <div class="weekch-top flexRow"> <a class="wktpa flexRow" href="/wz/339402.html" > <img src="/jiaoben/image/noimg.png" > </a> <div class="wktpa-right flexColumn"> <a class="wktpara flexRow overflowclass" href="/wz/339402.html" >Topaz AI 增强型 Instagram 轮播图生成器 - Openclaw Skills</a> <a class="wktparp flexRow overflowclass" href="/wz/339402.html" > 什么是 行程轮播贴(Topaz </a> </div> </div> <div class="weekch-list"> <div class="weekch-con flexRow"> <div class="weekch-icon flexRow"><b></b></div> <a href="/wz/339401.html" class="weekcha flexRow flexcenter overflowclass" >OpenAMC: 为 AI 智能体提供的全球金融数据连接器 - Openclaw Skills</a> </div> <div class="weekch-con flexRow"> <div class="weekch-icon flexRow"><b></b></div> <a href="/wz/339400.html" class="weekcha flexRow flexcenter overflowclass" >GitHub 免密设置:SSH 和 PAT 自动化 - Openclaw Skills</a> </div> <div class="weekch-con flexRow"> <div class="weekch-icon flexRow"><b></b></div> <a href="/wz/339399.html" class="weekcha flexRow flexcenter overflowclass" >安全自动填充:适用于 AI Agent 的 1Password 集成 - Openclaw Skills</a> </div> <div class="weekch-con flexRow"> <div class="weekch-icon flexRow"><b></b></div> <a href="/wz/339398.html" class="weekcha flexRow flexcenter overflowclass" >AI 智能体 Jira 管理:简化项目工作流 - Openclaw Skills</a> </div> <div class="weekch-con flexRow"> <div class="weekch-icon flexRow"><b></b></div> <a href="/wz/339394.html" class="weekcha flexRow flexcenter overflowclass" >面向 AI 智能体的 Jira & Confluence 集成 - Openclaw Skills</a> </div> <div class="weekch-con flexRow"> <div class="weekch-icon flexRow"><b></b></div> <a href="/wz/339393.html" class="weekcha flexRow flexcenter overflowclass" >网站监控器:在线状态与内容更改检测 - Openclaw Skills</a> </div> <div class="weekch-con flexRow"> <div class="weekch-icon flexRow"><b></b></div> <a href="/wz/339392.html" class="weekcha flexRow flexcenter overflowclass" >Duffel Flights:搜索、预订和管理航空公司预订 - Openclaw Skills</a> </div> <div class="weekch-con flexRow"> <div class="weekch-icon flexRow"><b></b></div> <a href="/wz/339391.html" class="weekcha flexRow flexcenter overflowclass" >iam: Netsnek e.U. 身份与访问管理 - Openclaw Skills</a> </div> <div class="weekch-con flexRow"> <div class="weekch-icon flexRow"><b></b></div> <a href="/wz/339389.html" class="weekcha flexRow flexcenter overflowclass" >Odoo ERP 连接器:AI 驱动的 ERP 自动化 - Openclaw Skills</a> </div> </div> </div> </div> <div class=" dtl-wz"> <div class="jb-titles flexRow"> <div class="jbtle-left flexRow"><b></b><p>相关文章</p></div> </div> <div class="blog-list"> <a href="/wz/360299.html" class="bloga flexRow over"><p class="overflowclass">快照测试编写器:自动化的 React Jest 测试 - Openclaw Skills</p><div class="blogtime"><span>04/</span>14</div></a> <a href="/wz/360300.html" class="bloga flexRow over"><p class="overflowclass">Roast Gen:带幽默感的 AI 驱动代码审查 - Openclaw Skills</p><div class="blogtime"><span>04/</span>14</div></a> <a href="/wz/360301.html" class="bloga flexRow over"><p class="overflowclass">发行说明生成器:自动化 Git 变更日志 - Openclaw Skills</p><div class="blogtime"><span>04/</span>14</div></a> <a href="/wz/360302.html" class="bloga flexRow over"><p class="overflowclass">重构助手:AI 驱动的代码改进 - Openclaw Skills</p><div class="blogtime"><span>04/</span>14</div></a> <a href="/wz/360317.html" class="bloga flexRow over"><p class="overflowclass">网页搜索:实时互联网信息检索 - Openclaw Skills</p><div class="blogtime"><span>04/</span>14</div></a> <a href="/wz/360318.html" class="bloga flexRow over"><p class="overflowclass">Muninn Memory:本地优先的 AI 智能体记忆系统 - Openclaw Skills</p><div class="blogtime"><span>04/</span>14</div></a> <a href="/wz/360319.html" class="bloga flexRow over"><p class="overflowclass">Openclaw Agent Token 优化器:用于减少 Token 的 AI 技能 - Openclaw Skills</p><div class="blogtime"><span>04/</span>14</div></a> <a href="/wz/360320.html" class="bloga flexRow over"><p class="overflowclass">能力感知系统:自动化技能发现 - Openclaw Skills</p><div class="blogtime"><span>04/</span>14</div></a> <a href="/wz/360322.html" class="bloga flexRow over"><p class="overflowclass">版本更新:自动化 Rust 版本管理与 CI/CD - Openclaw Skills</p><div class="blogtime"><span>04/</span>14</div></a> <a href="/wz/360324.html" class="bloga flexRow over"><p class="overflowclass">playwriter:持久化浏览器自动化与 UI 测试 - Openclaw Skills</p><div class="blogtime"><span>04/</span>14</div></a> </div> </div> <div class="cdr-ai"> <div class="jb-titles flexRow"> <div class="jbtle-left flexRow"><b></b><p>AI精选 </p></div> <a class="jbtitle-more flexRow" href="/category/list_344_1.html" title=""><span>更多</span><b></b></a> </div> <div class="ai-list"> <div class="ail-top flexRow"> <a href="/wz/360381.html" title="" class="ailta "> <img src="https://images.jiaoben.net/uploads/20260414/logo_69ddd787f1d0a1.jpg" > <p ><span>生成 2000 年代日本郊区氛围的</span></p></a> <a href="/wz/360380.html" title="" class="ailta "> <img src="https://images.jiaoben.net/uploads/20260414/logo_69ddd776af8491.jpg" > <p ><span>阳光乡村饮奶肖像</span></p></a> </div> <div class="ail-down"> <a class="ali-con flexRow" href="/wz/360336.html" title=""> <div class="alicon-left flexRow"><span>精选</span></div> <p class="aliconp overflowclass">高对比度影棚人像,采用青橙色光影效果</p> </a> <a class="ali-con flexRow" href="/wz/360296.html" title=""> <div class="alicon-left flexRow"><span>精选</span></div> <p class="aliconp overflowclass">电影感铺床场景提示词</p> </a> <a class="ali-con flexRow" href="/wz/360252.html" title=""> <div class="alicon-left flexRow"><span>精选</span></div> <p class="aliconp overflowclass">LangGraph 入门到精通0x00:HelloLangGraph</p> </a> <a class="ali-con flexRow" href="/wz/360251.html" title=""> <div class="alicon-left flexRow"><span>精选</span></div> <p class="aliconp overflowclass">Agent 开发进阶(十三):后台任务系统,让慢命令不阻塞主循环</p> </a> <a class="ali-con flexRow" href="/wz/360250.html" title=""> <div class="alicon-left flexRow"><span>精选</span></div> <p class="aliconp overflowclass">AI Streaming 架构:从浏览器到服务端的全链路流式设计</p> </a> <a class="ali-con flexRow" href="/wz/360249.html" title=""> <div class="alicon-left flexRow"><span>精选</span></div> <p class="aliconp overflowclass">Claude Code Skill 系统:懒加载的 Agent 行动说明</p> </a> <a class="ali-con flexRow" href="/wz/360248.html" title=""> <div class="alicon-left flexRow"><span>精选</span></div> <p class="aliconp overflowclass">Adaptive Thinking 的代价:当 AI 自己决定"想多少"</p> </a> <a class="ali-con flexRow" href="/wz/360247.html" title=""> <div class="alicon-left flexRow"><span>精选</span></div> <p class="aliconp overflowclass">一些容易混淆的点(个人记录)</p> </a> </div> </div> </div> <div class="cdr-blog"> <div class="jb-titles flexRow"> <div class="jbtle-left flexRow"><b></b><p>脚本推荐</p></div> </div> <div class="blog-list"> <a href="/wz/zt-49225.html" title="" class="bloga flexRow over"><p class="overflowclass">SeeDance 2.0 Video Creator专区</p></a> <a href="/wz/zt-49224.html" title="" class="bloga flexRow over"><p class="overflowclass">OpenClaw AI专区</p></a> <a href="/wz/zt-49223.html" title="" class="bloga flexRow over"><p class="overflowclass">cowork专区</p></a> <a href="/wz/zt-49222.html" title="" class="bloga flexRow over"><p class="overflowclass">claude code skills专区</p></a> </div> </div> </div> </div> </div> </div> </main> <script> $(function() { // “+ 收藏”按钮点击事件 $(document).on('click', '.htmitem-right, .ztop-right', function(e) { // 仅针对包含 “+ 收藏” 文字的按钮 if ($(this).text().indexOf('+ 收藏') === -1) return; e.preventDefault(); const id = $(this).data('id'); if (!id) { layer.msg('该项暂无有效ID,无法收藏'); return; } // 构造收藏 URL: 当前域名 + /wz/zt- + id + / const bookmarkUrl = window.location.origin + '/wz/zt-' + id + '.html'; // 获取收藏标题 (优先从同级元素获取话题名称,否则使用页面标题) let bookmarkTitle = $(this).closest('.htl-item, .zttopd').find('a:first, span.overflowclass').text().trim() || document.title; if (bookmarkTitle.startsWith('#')) bookmarkTitle = bookmarkTitle.substring(1); // 浏览器收藏逻辑 (带 Fallback) try { if (window.sidebar && window.sidebar.addPanel) { // Firefox < 23 window.sidebar.addPanel(bookmarkTitle, bookmarkUrl, ""); } else if (window.external && ('AddFavorite' in window.external)) { // IE window.external.AddFavorite(bookmarkUrl, bookmarkTitle); } else { // Chrome, Safari, Firefox 23+, etc. const isMac = /Mac/i.test(navigator.userAgent); const keyStr = isMac ? 'Command + D' : 'Ctrl + D'; layer.confirm('由于浏览器安全限制,请使用 <b>' + keyStr + '</b> 手动添加收藏。<br><br>收藏地址:<br><small>' + bookmarkUrl + '</small>', { title: '收藏提示', btn: ['复制链接', '知道了'], yes: function(index) { copyToClipboard(bookmarkUrl).then(() => { layer.msg('链接已复制,请手动添加到收藏夹'); }).catch(() => { layer.msg('复制失败,请手动选择复制'); }); layer.close(index); } }); } } catch (err) { layer.msg('收藏失败,请手动添加'); } }); // 兼容非 HTTPS 的复制函数 function copyToClipboard(text) { if (navigator.clipboard && window.isSecureContext) { return navigator.clipboard.writeText(text); } else { let textArea = document.createElement("textarea"); textArea.value = text; textArea.style.position = "fixed"; textArea.style.left = "-999999px"; textArea.style.top = "-999999px"; document.body.appendChild(textArea); textArea.focus(); textArea.select(); return new Promise((res, rej) => { document.execCommand('copy') ? res() : rej(); textArea.remove(); }); } } }); </script> <footer> <div class="foot "> <div class="foot-top flexRow"> <div class="foot-left"> <div class="ftl-top flexRow"><span class="flexRow flexcenter">脚本</span>在线</div> <p class="ftl-down"> 智能赋能梦想,脚本构筑现实。我们致力于链接AI智能指令 与传统自动化,为您提供一站式、高效率的脚 本资产与生成 服务。 </p> </div> <div class="foot-right flexRow"> <div class="ftr-list flexColumn"> <p>核心板块</p> <span>AI脚本库</span> <span>自动化仓库</span> <span>脚本实验室</span> </div> <div class="ftr-list flexColumn"> <p>关于我们</p> <a href="/category/list_229_1.html" >最新游戏</a> <span>商务合作</span> <span>隐私政策</span> </div> <div class="ftr-list flexColumn"> <p>社区支持</p> <span >API文档</span> <a href="/category/list_334_1.html" >攻略资讯</a> <span>违规举报</span> </div> </div> </div> <div class="foot-down flexColumn"> <p>© 2026 jiaoben.net | 脚本在线 | 联系:jiaobennet2026@163.com</p> <p>备案:<a style="color: #7F7F7F;" href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">湘ICP备18025217号-11</a> </p> </div> </div> </footer> <div style="display:none;"> <script type="text/javascript"> var _paq = window._paq = window._paq || []; _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//tongji.zhangwan.net/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '29']); // Add this code below within the Matomo JavaScript tracker code // Important: the tracker url includes the /matomo.php var secondaryTrackerUrl = u+'matomo.php'; var secondaryWebsiteId = 27; // Also send all of the tracking data to this other Matomo server, in website ID 77 _paq.push(['addTracker', secondaryTrackerUrl, secondaryWebsiteId]); // That's it! var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?5d3cfe1f36b1988029fe82a0d475b20d"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> </div> </body> </html>