@@ -29,34 +29,35 @@ How To Use
2929This extension exposes HAR API into the content allowing pages to trigger
3030HAR export as needed. To ensure that API is properly exposed into the
3131page content you need to yet set the following preference
32- in your Firefox profile (any string value passed into API calls):
32+ in your Firefox profile (any string value that is passed into API calls):
3333
3434` extensions.netmonitor.har.contentAPIToken `
3535
3636To start automated collecting of HTTP data you need to set
37- the following preference:
37+ the following preference to true :
3838
39- ` devtools .netmonitor.har.enableAutoExportToFile `
39+ ` extensions .netmonitor.har.enableAutomation `
4040
41- The script on your page can look like as follows:
41+ You might also want to also set the following preference to true,
42+ so the developer Toolbox doesn't have to be opened.
43+
44+ ` extensions.netmonitor.har.autoConnect ` to true,
45+
46+ An example script on your page can look like as follows:
4247
4348```
4449var options = {
45- token: "test", // Value of the token in your preferences
46- getData: true, // True if you want to also get HAR data as a string in the callback
47- title: "my custom title", // Title used for the HAR file
48- jsonp: false, // Set to true if you want HARP
49- fileName: "my test har file %Y, %H:%M:%S" // Name of the file
50+ token: "test", // Value of the token in your preferences
51+ getData: true, // True if you want to get HAR data as a string
5052};
5153
5254HAR.triggerExport(options).then(result => {
5355 console.log(result.data);
5456});
5557```
5658
57- Note that the developer Toolbox needs to be opened (press F12)
58-
5959Check out [ a test page] ( http://janodvarko.cz/har/tests/har-export-trigger/har-export-api.html )
60+ See more [ HAR API examples] ( https://github.com/firebug/har-export-trigger/wiki/Examples )
6061
6162Build & Run HAR Export Trigger
6263------------------------------
0 commit comments