Files
rrweb/rrweb-simple-ext/inject.js
zhaoyilun 27a17d7068
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
Add SuperRPA integration guide, simple extension and standalone replay page
- 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>
2026-04-10 17:08:24 +08:00

31 lines
669 B
JavaScript

// inject.js - runs in page context, auto-starts recording
(function() {
'use strict';
let stopFn = null;
// Auto-start recording
stopFn = rrwebRecord.record({
emit: function(event) {
window.postMessage({
__rrweb_action: 'event',
__rrweb_data: event
}, '*');
},
recordCrossOriginIframes: true
});
// Listen for stop command
window.addEventListener('message', function(event) {
if (event.source !== window) return;
if (event.data && event.data.__rrweb_action === 'stop') {
if (stopFn) {
stopFn();
stopFn = null;
}
}
});
console.log('[rrweb] Recording started');
})();