arn-browser 0.1.25 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arn-browser",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "A lightweight, browser autmation helper.",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -776,6 +776,27 @@ async function braveLauncher({ profilePath, proxy, CapSolver, timezoneId, humani
776
776
  console.warn("░░░░░ Could not modify Brave preferences:", e.message);
777
777
  }
778
778
 
779
+ // ======================================================
780
+ // Disable P3A analytics in Local State (root of profile dir)
781
+ // Brave stores P3A prefs in Local State, NOT Default/Preferences
782
+ // This suppresses "Brave uses completely private product analytics..." banner
783
+ // ======================================================
784
+ try {
785
+ const localStatePath = path.join(activePath, "Local State");
786
+ let localState = {};
787
+ if (fs.existsSync(localStatePath)) {
788
+ localState = JSON.parse(fs.readFileSync(localStatePath, "utf-8"));
789
+ }
790
+ if (!localState.brave) localState.brave = {};
791
+ if (!localState.brave.p3a) localState.brave.p3a = {};
792
+ localState.brave.p3a.enabled = false;
793
+ localState.brave.p3a.notice_acknowledged = true;
794
+
795
+ fs.writeFileSync(localStatePath, JSON.stringify(localState, null, 2), "utf-8");
796
+ } catch (e) {
797
+ console.warn("░░░░░ Could not modify Brave Local State:", e.message);
798
+ }
799
+
779
800
  const args = [
780
801
  "--test-type",
781
802
  // --- Stealth & Anti-Detection ---