From 600c337b1cdc884aebf59083eb57b178b43441ce Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Mon, 13 Jul 2026 11:35:08 +0530 Subject: docs: added some documentation comments to all functions --- config/webpack/utils/scripts.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'config/webpack/utils/scripts.js') diff --git a/config/webpack/utils/scripts.js b/config/webpack/utils/scripts.js index af58e0a..09a2fc0 100644 --- a/config/webpack/utils/scripts.js +++ b/config/webpack/utils/scripts.js @@ -1,6 +1,14 @@ import path from "path"; import fs from "fs"; +/** + * Reads `src/scripts.json` and re-indexes it so the outer key is the + * URL path fragment and the inner key is the script type. This makes it + * trivial to look up which scripts run on which page. + * + * @returns {Record>} e.g. + * `{ "*": { "injected": ["stop-blocking.ts"] }, "MuteApplication.action": … }` + */ const scripts = JSON.parse( fs.readFileSync( path.resolve("./src/scripts.json"), -- cgit v1.2.3