mirror of
https://github.com/webrecorder/browsertrix-crawler.git
synced 2025-10-19 06:23:16 +00:00

Follows #424. Converts the upcoming 1.0.0 branch based on native browser-based traffic capture and recording to TypeScript. Fixes #426 --------- Co-authored-by: Tessa Walsh <tessa@bitarchivist.net> Co-authored-by: emma <hi@emma.cafe>
23 lines
381 B
JavaScript
23 lines
381 B
JavaScript
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
class TestBehavior
|
|
{
|
|
static init() {
|
|
return {
|
|
state: {}
|
|
};
|
|
}
|
|
|
|
static get id() {
|
|
return "TestBehavior";
|
|
}
|
|
|
|
static isMatch() {
|
|
return window.location.origin === "https://example.com";
|
|
}
|
|
|
|
|
|
async* run(ctx) {
|
|
ctx.log("In Test Behavior!");
|
|
yield ctx.Lib.getState(ctx, "test-stat");
|
|
}
|
|
}
|