Merge pull request #8086 from deepak1556/devtools_remove_workspace_patch
override window.confirm in devtools
This commit is contained in:
Коммит
477ac313ab
|
@ -6,6 +6,19 @@ window.onload = function () {
|
|||
window.WebInspector.createFileSelectorElement = createFileSelectorElement
|
||||
}
|
||||
|
||||
window.confirm = function (message, title) {
|
||||
const {dialog} = require('electron').remote
|
||||
if (title == null) {
|
||||
title = ''
|
||||
}
|
||||
return !dialog.showMessageBox({
|
||||
message: message,
|
||||
title: title,
|
||||
buttons: ['OK', 'Cancel'],
|
||||
cancelId: 1
|
||||
})
|
||||
}
|
||||
|
||||
const convertToMenuTemplate = function (items) {
|
||||
return items.map(function (item) {
|
||||
const transformed = item.type === 'subMenu' ? {
|
||||
|
|
Загрузка…
Ссылка в новой задаче