Install Cookie-Editor in every computer's browser
A managed Chrome policy, written as root into each running computer's container on provision and every sync-computers run, installs the default extensions (normal_installed: can be turned off, not removed). Existing computers get it without being recreated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { ComputerBrowserExtensions } from "@/src/data/computer-browser-extensions";
|
||||
|
||||
/**
|
||||
* Where Chrome fetches Web Store extensions from.
|
||||
*/
|
||||
const WebStoreUpdateUrl = "https://clients2.google.com/service/update2/crx";
|
||||
|
||||
type Params = {
|
||||
extensions?: ReadonlyArray<{ id: string }>;
|
||||
};
|
||||
|
||||
/**
|
||||
* The managed policy file (`AppData.ComputerBrowserPolicyFile`) a
|
||||
* computer's Chrome reads: each extension (`ComputerBrowserExtensions` by
|
||||
* default) installed from the Web Store, which the user may turn off but
|
||||
* not remove. Always the same text for the same list, so a computer that
|
||||
* already has it is left alone.
|
||||
*/
|
||||
export default function computerBrowserPolicy({ extensions = ComputerBrowserExtensions }: Params = {}) {
|
||||
const settings = Object.fromEntries(
|
||||
extensions.map(({ id }) => [
|
||||
id,
|
||||
{ installation_mode: "normal_installed", update_url: WebStoreUpdateUrl },
|
||||
]),
|
||||
);
|
||||
|
||||
return `${JSON.stringify({ ExtensionSettings: settings }, null, 4)}\n`;
|
||||
}
|
||||
Reference in New Issue
Block a user