From d539660c93aa5e335321b44838f4b58e39662580 Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Mon, 22 Mar 2021 22:33:06 -0700 Subject: [PATCH] extension: Remove html for now. --- extension/background.js | 85 ----------------------------------------- 1 file changed, 85 deletions(-) diff --git a/extension/background.js b/extension/background.js index 92421b6..fc9e7f8 100644 --- a/extension/background.js +++ b/extension/background.js @@ -536,91 +536,6 @@ Router["/runtime/reload"] = { }, truncate() { return {}; } }; -Router["/runtime/background.js.html"] = defineFile(async () => { - const js = await window.fetch(chrome.runtime.getURL('background.js')) - .then(r => r.text()); - - const classes = [ - [/Router\["[^\]]+"\] = /, 'route'] - ]; - - const classedJs = - js.split('\n') - .map((line, i) => { - const class_ = classes.find(([re, class_]) => re.test(line)); - line = line - .replace(/&/g, "&") - .replace(//g, ">") - .replace(/"/g, """) - .replace(/'/g, "'"); - if (!class_) { return `
${line}
`; } - return `
${line}
`; - }) - .join(''); - - return ` - - - - - - -
${classedJs}
- - - - - `; -}); // Ensure that there are routes for all ancestors. This algorithm is // probably not correct, but whatever. Basically, you need to start at