Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
604b1dc8
Commit
604b1dc8
authored
Oct 13, 2021
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Fix: Security) 默认点击webContent内的超链接将以系统浏览器打开
parent
02e7058f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
app.js
app.js
+5
-0
No files found.
app.js
View file @
604b1dc8
...
@@ -10,6 +10,7 @@ const path = require('path');
...
@@ -10,6 +10,7 @@ const path = require('path');
const
electron
=
require
(
'electron'
);
const
electron
=
require
(
'electron'
);
const
{
const
{
app
,
app
,
shell
,
protocol
,
protocol
,
BrowserWindow
BrowserWindow
}
=
require
(
'electron'
);
}
=
require
(
'electron'
);
...
@@ -88,6 +89,10 @@ app.once('ready', () => {
...
@@ -88,6 +89,10 @@ app.once('ready', () => {
.
on
(
'enter-full-screen'
,
reloadUI
)
.
on
(
'enter-full-screen'
,
reloadUI
)
.
on
(
'leave-full-screen'
,
reloadUI
);
.
on
(
'leave-full-screen'
,
reloadUI
);
mainWindow
.
webContents
.
on
(
'new-window'
,
(
event
,
url
)
=>
{
event
.
preventDefault
();
shell
.
openExternal
(
url
);
});
// 打开调试控制台 mainWindow.webContents.openDevTools();
// 打开调试控制台 mainWindow.webContents.openDevTools();
electron
.
Logger
=
require
(
'./modules/logger'
)(
mainWindow
);
electron
.
Logger
=
require
(
'./modules/logger'
)(
mainWindow
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment