mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-08 17:09:07 +08:00
Merge branch 'feature/ui' into feature/multi-process
This commit is contained in:
@@ -149,12 +149,24 @@ jobs:
|
|||||||
- name: Display structure of downloaded files
|
- name: Display structure of downloaded files
|
||||||
run: ls -llR geekgeekrun-ui@${{ github.sha }}
|
run: ls -llR geekgeekrun-ui@${{ github.sha }}
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release for private
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
|
repo: ggr
|
||||||
prerelease: true
|
prerelease: true
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
artifacts: geekgeekrun-ui@${{ github.sha }}/*
|
artifacts: geekgeekrun-ui@${{ github.sha }}/*
|
||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GGR_ACTION_SECRET }}
|
||||||
|
body: TODO New Release.
|
||||||
|
|
||||||
|
- name: Create release for public
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
repo: geekgeekrun
|
||||||
|
prerelease: true
|
||||||
|
allowUpdates: true
|
||||||
|
artifacts: geekgeekrun-ui@${{ github.sha }}/*
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
token: ${{ secrets.GGR_ACTION_SECRET }}
|
||||||
body: TODO New Release.
|
body: TODO New Release.
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# 牛人快跑 - GeekGeekRun
|
# 牛人快跑 - GeekGeekRun
|
||||||
|
|
||||||
|
**->由于BOSS直聘于2026.1.8上线了反调试/反爬虫/反自动化逻辑,本程序可能暂时无法使用,目前正在尝试处理中;有相关处理经验的朋友可以提交PR<-**
|
||||||
|
|
||||||
**->维护者正在疯狂找工作<-**
|
**->维护者正在疯狂找工作<-**
|
||||||
|
|
||||||
一款可以帮助你在Boss直聘上**自动批量开聊Boss**的脚本,基于Puppeteer。
|
一款可以帮助你在Boss直聘上**自动批量开聊Boss**的脚本,基于Puppeteer。
|
||||||
@@ -138,9 +140,9 @@ Boss不明原因已读不回?简历就是投不出去?
|
|||||||
### 个人而言
|
### 个人而言
|
||||||
以我为例,我真的求职求累了
|
以我为例,我真的求职求累了
|
||||||
|
|
||||||
2023年初~2025年末,这段时间
|
2023年初~2026年年初,这段时间
|
||||||
- 求职经历:离职求职6个月;曾面试66个岗位,各种面试(一面、二面、三面、HR面)加起来134次;Offer 寥寥无几
|
- 求职经历:离职求职7个月;曾面试73个岗位,各种面试(一面、二面、三面、HR面)加起来156次;Offer 寥寥无几
|
||||||
- 被动失业经历:1 次裁员,1 次卡试用期,1 次部门收缩
|
- 被动失业经历:1 次裁员,1 次卡试用期,1 次部门整体裁撤
|
||||||
- 目前状态:无工作(**正在疯狂找工作**)
|
- 目前状态:无工作(**正在疯狂找工作**)
|
||||||
|
|
||||||
如此多的经历,已经让我成为了一位资深Boss用户
|
如此多的经历,已经让我成为了一位资深Boss用户
|
||||||
|
|||||||
+7
-1
@@ -11,11 +11,12 @@
|
|||||||
"author": "geekgeekrun",
|
"author": "geekgeekrun",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@geekgeekrun/puppeteer-extra-plugin-laodeng": "workspace:*",
|
||||||
"cheerio": "1.0.0-rc.12",
|
"cheerio": "1.0.0-rc.12",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"minimist": "^1.2.8",
|
"minimist": "^1.2.8",
|
||||||
"puppeteer": "20.1.0",
|
"puppeteer": "24.19.0",
|
||||||
"puppeteer-extra": "3.3.6",
|
"puppeteer-extra": "3.3.6",
|
||||||
"puppeteer-extra-plugin-stealth": "2.11.2",
|
"puppeteer-extra-plugin-stealth": "2.11.2",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
@@ -29,5 +30,10 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"pnpm": "=8.15.9"
|
"pnpm": "=8.15.9"
|
||||||
|
},
|
||||||
|
"pnpm": {
|
||||||
|
"patchedDependencies": {
|
||||||
|
"find-chrome-bin@2.0.4": "patches/find-chrome-bin@2.0.4.patch"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,21 +73,26 @@ export const autoStartChatEventBus = new EventEmitter()
|
|||||||
*/
|
*/
|
||||||
let puppeteer
|
let puppeteer
|
||||||
let StealthPlugin
|
let StealthPlugin
|
||||||
|
let LaodengPlugin
|
||||||
export async function initPuppeteer () {
|
export async function initPuppeteer () {
|
||||||
// production
|
// production
|
||||||
const importResult = await Promise.all(
|
const importResult = await Promise.all(
|
||||||
[
|
[
|
||||||
import('puppeteer-extra'),
|
import('puppeteer-extra'),
|
||||||
import('puppeteer-extra-plugin-stealth')
|
import('puppeteer-extra-plugin-stealth'),
|
||||||
|
import('@geekgeekrun/puppeteer-extra-plugin-laodeng')
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
puppeteer = importResult[0].default
|
puppeteer = importResult[0].default
|
||||||
StealthPlugin = importResult[1].default
|
StealthPlugin = importResult[1].default
|
||||||
|
LaodengPlugin = importResult[2].default
|
||||||
puppeteer.use(StealthPlugin())
|
puppeteer.use(StealthPlugin())
|
||||||
|
puppeteer.use(LaodengPlugin())
|
||||||
|
|
||||||
return {
|
return {
|
||||||
puppeteer,
|
puppeteer,
|
||||||
StealthPlugin
|
StealthPlugin,
|
||||||
|
LaodengPlugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1472,6 +1477,7 @@ export async function mainLoop (hooks) {
|
|||||||
}
|
}
|
||||||
await setDomainLocalStorage(browser, localStoragePageUrl, bossLocalStorage)
|
await setDomainLocalStorage(browser, localStoragePageUrl, bossLocalStorage)
|
||||||
await page.bringToFront()
|
await page.bringToFront()
|
||||||
|
// __GGR_INJECT_ANTI_ANTI_DEBUGGER__
|
||||||
await hooks.mainFlowWillLaunch?.promise({
|
await hooks.mainFlowWillLaunch?.promise({
|
||||||
jobNotMatchStrategy,
|
jobNotMatchStrategy,
|
||||||
jobNotActiveStrategy,
|
jobNotActiveStrategy,
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"name": "@geekgeekrun/puppeteer-extra-plugin-laodeng",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"description": "laodeng",
|
||||||
|
"main": "./index.js",
|
||||||
|
"author": "geekgeekrun",
|
||||||
|
"productName": "GeekGeekRun",
|
||||||
|
"homepage": "https://github.com/geekgeekrun",
|
||||||
|
"scripts": {},
|
||||||
|
"dependencies": {
|
||||||
|
"puppeteer-extra": "^3.3.6",
|
||||||
|
"puppeteer-extra-plugin": "^3.2.3"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"playwright-extra": "*",
|
||||||
|
"puppeteer": "^24.19.0",
|
||||||
|
"puppeteer-extra": "*"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"puppeteer-extra": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"playwright-extra": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -30,9 +30,8 @@ export async function main() {
|
|||||||
const { puppeteer } = await initPuppeteer()
|
const { puppeteer } = await initPuppeteer()
|
||||||
const browser = await puppeteer.launch({
|
const browser = await puppeteer.launch({
|
||||||
headless: false,
|
headless: false,
|
||||||
args: [
|
pipe: true,
|
||||||
`--load-extension=${editThisCookieExtensionPath}`
|
enableExtensions: [editThisCookieExtensionPath]
|
||||||
]
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const closeAttachedSet = new WeakSet()
|
const closeAttachedSet = new WeakSet()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "geekgeekrun-ui",
|
"name": "geekgeekrun-ui",
|
||||||
"version": "0.12.0",
|
"version": "0.13.3",
|
||||||
"description": "Boss 炸弹 - 自动开聊Boss,助力每位打工人求职!",
|
"description": "Boss 炸弹 - 自动开聊Boss,助力每位打工人求职!",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "geekgeekrun",
|
"author": "geekgeekrun",
|
||||||
@@ -33,6 +33,7 @@
|
|||||||
"@geekgeekrun/dingtalk-plugin": "workspace:*",
|
"@geekgeekrun/dingtalk-plugin": "workspace:*",
|
||||||
"@geekgeekrun/geek-auto-start-chat-with-boss": "workspace:*",
|
"@geekgeekrun/geek-auto-start-chat-with-boss": "workspace:*",
|
||||||
"@geekgeekrun/launch-bosszhipin-login-page-with-preload-extension": "workspace:*",
|
"@geekgeekrun/launch-bosszhipin-login-page-with-preload-extension": "workspace:*",
|
||||||
|
"@geekgeekrun/puppeteer-extra-plugin-laodeng": "workspace:*",
|
||||||
"@geekgeekrun/sqlite-plugin": "workspace:*",
|
"@geekgeekrun/sqlite-plugin": "workspace:*",
|
||||||
"@geekgeekrun/utils": "workspace:*",
|
"@geekgeekrun/utils": "workspace:*",
|
||||||
"@geekgeekrun/pm": "workspace:*",
|
"@geekgeekrun/pm": "workspace:*",
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
"mitt": "^3.0.1",
|
"mitt": "^3.0.1",
|
||||||
"node-machine-id": "^1.1.12",
|
"node-machine-id": "^1.1.12",
|
||||||
"pinia": "^3.0.2",
|
"pinia": "^3.0.2",
|
||||||
"puppeteer": "20.1.0",
|
"puppeteer": "24.19.0",
|
||||||
"puppeteer-extra-plugin-stealth": "2.11.2",
|
"puppeteer-extra-plugin-stealth": "2.11.2",
|
||||||
"uuid": "^11.1.0",
|
"uuid": "^11.1.0",
|
||||||
"vuedraggable": "^4.1.0"
|
"vuedraggable": "^4.1.0"
|
||||||
@@ -55,7 +56,7 @@
|
|||||||
"@electron-toolkit/tsconfig": "^1.0.1",
|
"@electron-toolkit/tsconfig": "^1.0.1",
|
||||||
"@inquirer/prompts": "^7.0.1",
|
"@inquirer/prompts": "^7.0.1",
|
||||||
"@inquirer/select": "^4.0.1",
|
"@inquirer/select": "^4.0.1",
|
||||||
"@puppeteer/browsers": "^2.0.0",
|
"@puppeteer/browsers": "^2.11.0",
|
||||||
"@rushstack/eslint-patch": "^1.7.1",
|
"@rushstack/eslint-patch": "^1.7.1",
|
||||||
"@types/node": "^18.19.9",
|
"@types/node": "^18.19.9",
|
||||||
"@unocss/preset-attributify": "^0.58.5",
|
"@unocss/preset-attributify": "^0.58.5",
|
||||||
@@ -72,7 +73,7 @@
|
|||||||
"element-plus": "^2.8.4",
|
"element-plus": "^2.8.4",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-plugin-vue": "^9.20.1",
|
"eslint-plugin-vue": "^9.20.1",
|
||||||
"find-chrome-bin": "^2.0.1",
|
"find-chrome-bin": "^2.0.4",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"normalize.css": "^8.0.1",
|
"normalize.css": "^8.0.1",
|
||||||
"prettier": "^3.2.4",
|
"prettier": "^3.2.4",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"version": "0.12.0",
|
"version": "0.13.3",
|
||||||
"buildVersion": 26,
|
"buildVersion": 29,
|
||||||
"buildTime": 1766591012661,
|
"buildTime": 1768226645980,
|
||||||
"buildHash": "0928b402fb5019b587ddec62825c9c2f4a5a11fb",
|
"buildHash": "ca37e258c69f54492488f285a1ec1f385baee478",
|
||||||
"name": "geekgeekrun-ui"
|
"name": "geekgeekrun-ui"
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,7 @@ export enum DOWNLOAD_ERROR_EXIT_CODE {
|
|||||||
|
|
||||||
export const checkAndDownloadDependenciesForInit = async () => {
|
export const checkAndDownloadDependenciesForInit = async () => {
|
||||||
process.on('disconnect', () => app.exit())
|
process.on('disconnect', () => app.exit())
|
||||||
|
process.on('uncaughtException', () => app.exit(DOWNLOAD_ERROR_EXIT_CODE.DOWNLOAD_ERROR))
|
||||||
app.dock?.hide()
|
app.dock?.hide()
|
||||||
let pipe: null | fs.WriteStream = null
|
let pipe: null | fs.WriteStream = null
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ export interface BrowserInfo {
|
|||||||
executablePath: string
|
executablePath: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const CONFIG_VSERION = 2
|
||||||
|
|
||||||
const runtimeFolderPath = path.join(os.homedir(), '.geekgeekrun')
|
const runtimeFolderPath = path.join(os.homedir(), '.geekgeekrun')
|
||||||
export const lastUsedBrowserRecordFilePath = path.join(
|
export const lastUsedBrowserRecordFilePath = path.join(
|
||||||
runtimeFolderPath,
|
runtimeFolderPath,
|
||||||
@@ -28,8 +30,13 @@ export const getLastUsedAndAvailableBrowser = async (): Promise<BrowserInfo | nu
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const fileContent = (await fsPromise.readFile(lastUsedBrowserRecordFilePath)).toString()
|
const fileContent = (await fsPromise.readFile(lastUsedBrowserRecordFilePath)).toString()
|
||||||
const [path, browser] = fileContent.split('\n').map((it) => it.trim())
|
const [path, browser, configVersion] = fileContent.split('\n').map((it) => it.trim())
|
||||||
if (!path || !fs.existsSync(path)) {
|
if (
|
||||||
|
!path ||
|
||||||
|
!fs.existsSync(path) ||
|
||||||
|
!Number(configVersion) ||
|
||||||
|
Number(configVersion) < CONFIG_VSERION
|
||||||
|
) {
|
||||||
await removeLastUsedAndAvailableBrowserPath()
|
await removeLastUsedAndAvailableBrowserPath()
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -57,7 +64,7 @@ export const saveLastUsedAndAvailableBrowserInfo = async (browserInfo: BrowserIn
|
|||||||
}
|
}
|
||||||
await fsPromise.writeFile(
|
await fsPromise.writeFile(
|
||||||
lastUsedBrowserRecordFilePath,
|
lastUsedBrowserRecordFilePath,
|
||||||
[browserInfo.executablePath, browserInfo.browser].join('\n')
|
[browserInfo.executablePath, browserInfo.browser, CONFIG_VSERION].join('\n')
|
||||||
)
|
)
|
||||||
} catch {
|
} catch {
|
||||||
console.warn('lastUsedBrowserRecordFile write error')
|
console.warn('lastUsedBrowserRecordFile write error')
|
||||||
|
|||||||
+2
-2
@@ -16,7 +16,7 @@ const getPuppeteerManagerModule = async () => {
|
|||||||
return puppeteerManager
|
return puppeteerManager
|
||||||
}
|
}
|
||||||
|
|
||||||
const EXPECT_CHROMIUM_BUILD_ID = '113.0.5672.63'
|
const EXPECT_CHROMIUM_BUILD_ID = '139.0.7258.154'
|
||||||
const cacheDir = path.join(os.homedir(), '.geekgeekrun', 'cache')
|
const cacheDir = path.join(os.homedir(), '.geekgeekrun', 'cache')
|
||||||
|
|
||||||
const getExpectCachedPuppeteerExecutable = async (): Promise<BrowserInfo> => {
|
const getExpectCachedPuppeteerExecutable = async (): Promise<BrowserInfo> => {
|
||||||
@@ -130,7 +130,7 @@ export async function findAndLocateUserInstalledChromiumExecutableSync(): Promis
|
|||||||
const findChrome: typeof import('find-chrome-bin').findChrome = (await import('find-chrome-bin'))
|
const findChrome: typeof import('find-chrome-bin').findChrome = (await import('find-chrome-bin'))
|
||||||
.findChrome
|
.findChrome
|
||||||
const targetBrowser = await findChrome({
|
const targetBrowser = await findChrome({
|
||||||
min: exceptChromiumMainVersion
|
min: exceptChromiumMainVersion + 1
|
||||||
})
|
})
|
||||||
if (!targetBrowser?.executablePath) {
|
if (!targetBrowser?.executablePath) {
|
||||||
throw new Error('NO_EXPECT_CHROMIUM_FOUND')
|
throw new Error('NO_EXPECT_CHROMIUM_FOUND')
|
||||||
|
|||||||
@@ -371,7 +371,8 @@ export async function launchBossSite() {
|
|||||||
const { puppeteer } = await initPuppeteer()
|
const { puppeteer } = await initPuppeteer()
|
||||||
const browser = await puppeteer.launch({
|
const browser = await puppeteer.launch({
|
||||||
headless: false,
|
headless: false,
|
||||||
args: [`--load-extension=${editThisCookieExtensionPath}`]
|
pipe: true,
|
||||||
|
enableExtensions: [editThisCookieExtensionPath]
|
||||||
})
|
})
|
||||||
let [page] = await browser.pages()
|
let [page] = await browser.pages()
|
||||||
for (let i = 0; i < bossCookies.length; i++) {
|
for (let i = 0; i < bossCookies.length; i++) {
|
||||||
|
|||||||
@@ -11,9 +11,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onUnmounted, PropType } from 'vue'
|
import { ref, onUnmounted, PropType, h } from 'vue'
|
||||||
import { ElMessageBox } from 'element-plus'
|
import { ElMessageBox } from 'element-plus'
|
||||||
import { gtagRenderer } from '@renderer/utils/gtag'
|
import { gtagRenderer } from '@renderer/utils/gtag'
|
||||||
|
import { sleep } from '@geekgeekrun/utils/sleep.mjs'
|
||||||
|
import FailMessage from './FailMessage.vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dependenciesStatus: {
|
dependenciesStatus: {
|
||||||
@@ -36,12 +38,24 @@ const downloadProcessExitCode = ref(0)
|
|||||||
const processDownloadBrowser = async () => {
|
const processDownloadBrowser = async () => {
|
||||||
downloadProcessExitCode.value = 0
|
downloadProcessExitCode.value = 0
|
||||||
browserDownloadPercentage.value = 0
|
browserDownloadPercentage.value = 0
|
||||||
try {
|
let restRetriedTime = 2
|
||||||
await electron.ipcRenderer.invoke('setup-dependencies')
|
while (restRetriedTime > 0) {
|
||||||
browserDownloadPercentage.value = 100
|
try {
|
||||||
} catch (err) {
|
try {
|
||||||
downloadProcessExitCode.value = 1
|
await electron.ipcRenderer.invoke('setup-dependencies')
|
||||||
throw err
|
browserDownloadPercentage.value = 100
|
||||||
|
} catch (err) {
|
||||||
|
downloadProcessExitCode.value = 1
|
||||||
|
throw err
|
||||||
|
}
|
||||||
|
break
|
||||||
|
} catch (err) {
|
||||||
|
restRetriedTime--
|
||||||
|
if (restRetriedTime === 0) {
|
||||||
|
throw err
|
||||||
|
}
|
||||||
|
await sleep(5000)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,12 +82,13 @@ const processTasks = async () => {
|
|||||||
await p
|
await p
|
||||||
} catch {
|
} catch {
|
||||||
gtagRenderer('encounter_error_when_download_deps')
|
gtagRenderer('encounter_error_when_download_deps')
|
||||||
await ElMessageBox.confirm('需要重试吗?', '核心组件下载失败', {
|
await ElMessageBox.confirm(h(FailMessage), {
|
||||||
closeOnClickModal: false,
|
closeOnClickModal: false,
|
||||||
closeOnPressEscape: false,
|
closeOnPressEscape: false,
|
||||||
showClose: false,
|
showClose: false,
|
||||||
type: 'error',
|
type: 'error',
|
||||||
cancelButtonText: '退出程序'
|
cancelButtonText: '退出程序',
|
||||||
|
confirmButtonText: '重试'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
gtagRenderer('start_retry_download_deps')
|
gtagRenderer('start_retry_download_deps')
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<p>核心组件下载失败,请重试。</p>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<p>
|
||||||
|
<b text-orange>提示:</b>由于网络颠簸,如果多次重试仍然失败,请 <el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
font-size-14px
|
||||||
|
@click="handleOpenChromeDownloadPage"
|
||||||
|
>点击此处</el-button
|
||||||
|
> 下载最新版本 Google Chrome
|
||||||
|
浏览器,安装完毕后,重新打开本程序,程序会自动检测该浏览器并使用它。
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { gtagRenderer } from '@renderer/utils/gtag'
|
||||||
|
import debounce from 'lodash-es/debounce'
|
||||||
|
const { ipcRenderer } = electron
|
||||||
|
|
||||||
|
const handleOpenChromeDownloadPage = debounce(
|
||||||
|
async () => {
|
||||||
|
gtagRenderer('open_chrome_download_page_clicked')
|
||||||
|
ipcRenderer.send('open-external-link', 'https://www.google.cn/chrome/')
|
||||||
|
},
|
||||||
|
1000,
|
||||||
|
{ leading: true, trailing: false }
|
||||||
|
)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
diff --git a/src/win32/index.js b/src/win32/index.js
|
||||||
|
index 53e2279e4a0c51dfe0725100005fafed2c6537a5..d9de7840e2ad0bfe625e6067cc764cee220035f1 100644
|
||||||
|
--- a/src/win32/index.js
|
||||||
|
+++ b/src/win32/index.js
|
||||||
|
@@ -15,12 +15,13 @@ export function findChromeBinaryOnWin32(canary) {
|
||||||
|
].filter(Boolean)
|
||||||
|
|
||||||
|
let result
|
||||||
|
-
|
||||||
|
- prefixes.forEach(prefix => {
|
||||||
|
+ for (const prefix of prefixes) {
|
||||||
|
let chromePath = join(prefix, suffix)
|
||||||
|
- if (canAccess(chromePath)) result = chromePath
|
||||||
|
- })
|
||||||
|
-
|
||||||
|
+ if (canAccess(chromePath)) {
|
||||||
|
+ result = chromePath
|
||||||
|
+ break
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
Generated
+368
-279
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user