Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read environment variable from Google Chrome extension

Is it possible to read an environment variable from the code of a Google Chrome extension, that is, from background.js? This is possible in case of Mozilla Firefox extensions, this way:

var system = require("sdk/system");
console.log(system.env.PATH);

What is the equivalent code in case of Chrome? The OS is Windows.

like image 375
kol Avatar asked Apr 07 '14 15:04

kol


1 Answers

If you want to interact with OS you have to create Windows executable and use Native Messaging to communicate with it. Take a look at example.

like image 91
KAdot Avatar answered Nov 15 '22 23:11

KAdot