browsertrix-crawler/tests/custom-behaviors/custom.js
Emma Segal-Grossman 2a49406df7
Add Prettier to the repo, and format all the files! (#428)
This adds prettier to the repo, and sets up the pre-commit hook to
auto-format as well as lint.
Also updates ignores files to exclude crawls, test-crawls, scratch, dist as needed.
2023-11-09 16:11:11 -08:00

21 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");
}
}