From 57726b4354a02f85101d4369d05fd7629be68ea3 Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Sun, 21 Mar 2021 11:55:52 -0700 Subject: extension: first cut at background.js.html --- extension/background.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'extension') 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 ` + + +
+ ${Object.entries(router).map(([a, b]) => ` +
${a}
+
${b}
+ `).join('\n')} +
+
${js}
+ + + `; +}); // Ensure that there are routes for all ancestors. This algorithm is // probably not correct, but whatever. Basically, you need to start at -- cgit v1.2.3