Add menu "Clear Cache and Reload"
This commit is contained in:
@@ -61,9 +61,21 @@ var createTemplate = function(mainWindow) {
|
||||
label: 'Reload',
|
||||
accelerator: 'CmdOrCtrl+R',
|
||||
click: function(item, focusedWindow) {
|
||||
if (focusedWindow)
|
||||
if (focusedWindow) {
|
||||
focusedWindow.reload();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
label: 'Clear Cache and Reload',
|
||||
accelerator: 'Shift+CmdOrCtrl+R',
|
||||
click: function(item, focusedWindow) {
|
||||
// TODO: should reload the selected tab only
|
||||
if (focusedWindow) {
|
||||
focusedWindow.webContents.session.clearCache(function() {
|
||||
focusedWindow.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
}, {
|
||||
label: 'Toggle Full Screen',
|
||||
accelerator: (function() {
|
||||
|
Reference in New Issue
Block a user