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
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:
30
rrweb-simple-ext/inject.js
Normal file
30
rrweb-simple-ext/inject.js
Normal file
@@ -0,0 +1,30 @@
|
||||
// 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');
|
||||
})();
|
||||
Reference in New Issue
Block a user