diff options
-rw-r--r-- | extension/background.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/extension/background.js b/extension/background.js index 4caaaf0..107d847 100644 --- a/extension/background.js +++ b/extension/background.js @@ -585,6 +585,23 @@ router["/runtime/reload"] = { }, truncate() { return {}; } }; +router["/runtime/background.js.html"] = defineFile(async path => { + const js = await window.fetch(chrome.runtime.getURL('background.js')) + .then(r => r.text()); + return ` +<html> + <body> + <dl> + ${Object.entries(router).map(([a, b]) => ` + <dt>${a}</dt> + <dd>${b}</dd> + `).join('\n')} + </dl> + <pre><code>${js}</code></pre> + </body> +</html> + `; +}); // Ensure that there are routes for all ancestors. This algorithm is // probably not correct, but whatever. Basically, you need to start at |