diff --git a/ElectronJS/main.js b/ElectronJS/main.js index f668383..a5f8905 100644 --- a/ElectronJS/main.js +++ b/ElectronJS/main.js @@ -1,5 +1,5 @@ // Modules to control application life and create native browser window -const {app, BrowserWindow, dialog, ipcMain, screen} = require('electron'); +const {app, BrowserWindow, dialog, ipcMain, screen, session} = require('electron'); app.commandLine.appendSwitch("--disable-http-cache"); const {Builder, By, Key, until} = require("selenium-webdriver"); const chrome = require('selenium-webdriver/chrome'); @@ -520,6 +520,10 @@ function handleOpenInvoke(event, lang = "en") { // initialization and is ready to create browser windows. // Some APIs can only be used after this event occurs. app.whenReady().then(() => { + session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => { + details.requestHeaders['Accept-Language'] = 'zh' + callback({ cancel: false, requestHeaders: details.requestHeaders }) + }) ipcMain.on('start-design', handleOpenBrowser); ipcMain.on('start-invoke', handleOpenInvoke); createWindow(); diff --git a/ElectronJS/src/img/animation_en.gif b/ElectronJS/src/img/animation_en.gif new file mode 100644 index 0000000..cea4d06 Binary files /dev/null and b/ElectronJS/src/img/animation_en.gif differ diff --git a/ElectronJS/src/img/animation_zh.gif b/ElectronJS/src/img/animation_zh.gif new file mode 100644 index 0000000..12e0aa8 Binary files /dev/null and b/ElectronJS/src/img/animation_zh.gif differ diff --git a/ElectronJS/src/index.html b/ElectronJS/src/index.html index 29c21e5..727fded 100644 --- a/ElectronJS/src/index.html +++ b/ElectronJS/src/index.html @@ -1,5 +1,5 @@ - +
@@ -67,6 +67,9 @@ @click class="btn btn-primary btn-lg" style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">View/Manage/Invoke Tasks ++ Browse official website to watch tutorials +
+ 点此访问官网查看教程 +
{{"(Right click) Select a large product block -> Click the 'Select All' option -> Click the 'Select Child Elements' option -> Click the 'Collect Data' option, you can collect the information of all products, and will be saved by sub-field. ~ (右键)选中一个大商品块 -> 自动检测到同类型商品块 -> 点击“选中全部”选项 -> 点击“选中子元素”选项 -> 点击“采集数据”选项,即可采集到所有商品的所有信息,并分成不同字段保存。" | lang}}
+{{"(右键)选中一个商品标题,同类型标题会被自动匹配,点击“选中全部”选项 -> 点击“采集数据”选项,即可采集到所有商品的标题信息。~ (Right Click) Select a product title, the same type of title will be automatically matched, click the 'Select All' option -> Click the 'Collect Data' option, you can collect the title information of all products." | lang}}
+