Browse Source

Solve the problem that the extension cannot be loaded after chrome version 137

Naibo_Mac_M2 3 tháng trước cách đây
mục cha
commit
c937bb2c77
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      ElectronJS/main.js

+ 1 - 0
ElectronJS/main.js

@@ -1396,6 +1396,7 @@ async function runBrowser(lang = "en", user_data_folder = "", mobile = false) {
     options.addArguments("--disable-infobars");
     options.addArguments("--disable-web-security");
     options.addArguments("--disable-features=CrossSiteDocumentBlockingIfIsolating,CrossSiteDocumentBlockingAlways,IsolateOrigins,site-per-process");
+    options.addArguments("--disable-features=DisableLoadExtensionCommandLineSwitch");
     // 添加实验性选项以排除'enable-automation'开关
     options.set("excludeSwitches", ["enable-automation"]);
     options.excludeSwitches("enable-automation");