Firefox-first browser extension for polling WebTask tasks and running automation steps/scripts.
- Open Firefox and go to
about:debugging#/runtime/this-firefox. - Click Load Temporary Add-on.
- Select
manifest.jsonfrom this repository. - Open the WebTask toolbar popup or the extension options dashboard.
- Set Webhook URL to your panel base URL, or directly to
/api/webtask. - Optional: set API Key if your panel enables auth.
- Click Save and then Test.
Webhook URL examples:
https://panel.example.comhttps://panel.example.com/api/webtask
The Firefox entry points stay simple while the source is grouped by purpose:
manifest.json,background.js,content.jspopup/- toolbar popup UIdashboard/- full options/dashboard UIshared/- background/page helper modulestasks/- task JSON definitionsscripts/- local validation scripts
See docs/PROJECT_STRUCTURE.md for the cleanup map and docs/TASKS.md for the
current task JSON inventory.
Run the local repository self-check:
npm run checkWhen a task runs, the extension injects variables into the script:
ctx.variables.API_KEY: API key from extension settingsctx.variables.api_key: same key (lowercase)
Fetch a verification code from the panel using a site_key:
async function (ctx) {
const base = "https://panel.example.com"; // your panel domain
const siteKey = "kerit_cloud";
const res = await ctx.http({
method: "POST",
url: `${base}/api/email-code/request`,
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${ctx.variables.API_KEY}`
},
body: {
site_key: siteKey,
timeout_seconds: 120
}
});
if (!res || res.status !== 200 || !res.data?.code?.code) {
await ctx.log(`Failed to fetch code: ${res?.status} ${res?.error || ""}`);
return;
}
const code = res.data.code.code;
await ctx.log(`OTP: ${code}`);
// Example: fill input
// await ctx.type("input[name='otp']", code);
}- The extension polls
/api/webtask/pendingand reports to/api/webtask/report. - If your panel uses auth, keep the API key only in extension settings (do not hardcode).