|
@@ -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' ? {
|