mirror of
https://github.com/webrecorder/browsertrix-crawler.git
synced 2025-11-01 04:30:53 +00:00
23 lines
326 B
JavaScript
23 lines
326 B
JavaScript
|
|
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");
|
||
|
|
}
|
||
|
|
}
|