Skip to content

Commit

Permalink
Fixed loadURL
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxianqiao committed Aug 29, 2021
1 parent 702a820 commit 9909e4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "google-translate",
"version": "4.1.15",
"version": "4.1.16",
"description": "google translate, work in any app",
"main": "./dist/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/main/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export default class Window extends BrowserWindow {

this.webContents.addListener('crashed', console.log);

internetAvailable({ retries: 3600 })
internetAvailable({ timeout: 1000, retries: 5, port: '53', host: '114.114.114.114', domainName: 'google.com' })
.then(() => {
return new Promise(async (resolve, reject) => {
return new Promise((resolve, reject) => {
// https://github.com/electron/electron/issues/20357
const testWindow = new BrowserWindow({ show: false });
testWindow.loadURL(config.translateUrl);
Expand Down

0 comments on commit 9909e4b

Please sign in to comment.