Add SuperRPA integration guide, simple extension and standalone replay page
Some checks failed
Tests / Tests (push) Has been cancelled
ESLint Check / ESLint Check and Report Upload (push) Has been cancelled
Prettier Check / Format Check (push) Has been cancelled
Prettier Check / Format Code (push) Has been cancelled
ESLint Check / Build Base for Bundle Size Comparison (push) Has been cancelled

- docs/integration/superrpa-integration.zh_CN.md: complete integration guide
- rrweb-simple-ext/: minimal Chrome extension for page recording
- replay.html: standalone drag-and-drop replay viewer
- CLAUDE.md: project instructions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
zhaoyilun
2026-04-10 17:08:24 +08:00
parent 87c94ae3a9
commit 27a17d7068
10 changed files with 14102 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
// background.js - service worker
const events = [];
let recording = false;
let activeTabId = null;
chrome.runtime.onMessage.addListener((msg, sender, sendResponse) => {
if (msg.action === 'startRecording') {
events.length = 0;
recording = true;
activeTabId = msg.tabId;
chrome.tabs.sendMessage(msg.tabId, { action: 'startRecord' });
sendResponse({ ok: true });
} else if (msg.action === 'stopRecording') {
recording = false;
chrome.tabs.sendMessage(activeTabId, { action: 'stopRecord' });
sendResponse({ ok: true, eventCount: events.length });
} else if (msg.action === 'getEvents') {
sendResponse({ events: events });
} else if (msg.action === 'event') {
events.push(msg.data);
} else if (msg.action === 'getStatus') {
sendResponse({ recording, eventCount: events.length });
}
return true;
});