this was the big problem that was a huge hiccup. it is now solved. The next thing is just getting the buttons to work the way they're expected to other than that it's all fine.
18 lines
570 B
JavaScript
18 lines
570 B
JavaScript
// see b_lib.ts, function gb for the thing that talks to this
|
|
main();
|
|
|
|
async function main() {
|
|
// connect to the runtime
|
|
let port = browser.runtime.connect();
|
|
// wait for a message
|
|
port.onMessage.addListener(
|
|
function({title, miscinfo, timeout_ms}) {
|
|
console.log('title', title);
|
|
console.log('miscinfo', miscinfo);
|
|
console.log('timeout_ms', timeout_ms);
|
|
document.getElementById('title-h1').innerHTML = title;
|
|
document.getElementById('miscinfo').innerHTML = miscinfo;
|
|
}
|
|
);
|
|
}
|