app.js
// Ctrl+D to open dev tools
Ctrl+D to open dev tools
Ctrl + D to open dev tools
function keydown(e) {
        if (e.keyCode == 116) { 
            if (e.preventDefault) e.preventDefault()
            sites[activeSite].webview[0].reload()
        }
        if ((e.ctrlKey && e.keyCode == '9')) {
            let nextSite = activeSite + (e.shiftKey ? -1 : 1);
            if (nextSite > sites.length-1) {
                nextSite = 0
            } else if (nextSite < 0) {
                nextSite = sites.length - 1
            }
            selectSite(nextSite)
        }
        if ((e.ctrlKey && !isMacOS) || (e.metaKey && isMacOS)) {
            switch (String.fromCharCode(e.keyCode)) {
            case 'R':
                if (e.preventDefault) e.preventDefault()
                e.shiftKey ? ipcRenderer.send('reload') : sites[activeSite].webview[0].reload()
                break
            case 'Y':
                if (e.preventDefault) e.preventDefault()
                siteElems[activeSite].webview[0].redo()
                break
            case 'Z':
                if (e.preventDefault) e.preventDefault()
                siteElems[activeSite].webview[0].undo()
                break
            }
            if (e.keyCode >= 49 && e.keyCode <= 57) {
                if (e.preventDefault) e.preventDefault()
                selectSite(e.keyCode - 49)
            }
        }
    }
function keydown ( e ) { if ( e . keyCode == 116 ) { if ( e . preventDefault ) e . preventDefault ( ) sites [ activeSite ] . webview [ 0 ] . reload ( ) } if ( ( e . ctrlKey && e . keyCode == '9' ) ) { let nextSite = activeSite + ( e . shiftKey ? - 1 : 1 ) ; if ( nextSite > sites . length - 1 ) { nextSite = 0 } else if ( nextSite < 0 ) { nextSite = sites . length - 1 } selectSite ( nextSite ) } if ( ( e . ctrlKey && ! isMacOS ) || ( e . metaKey && isMacOS ) ) { switch ( String . fromCharCode ( e . keyCode ) ) { case 'R' : if ( e . preventDefault ) e . preventDefault ( ) e . shiftKey ? ipcRenderer . send ( 'reload' ) : sites [ activeSite ] . webview [ 0 ] . reload ( ) break case 'Y' : if ( e . preventDefault ) e . preventDefault ( ) siteElems [ activeSite ] . webview [ 0 ] . redo ( ) break case 'Z' : if ( e . preventDefault ) e . preventDefault ( ) siteElems [ activeSite ] . webview [ 0 ] . undo ( ) break } if ( e . keyCode >= 49 && e . keyCode <= 57 ) { if ( e . preventDefault ) e . preventDefault ( ) selectSite ( e . keyCode - 49 ) } } }
Ctrl+D to open dev tools
Ctrl + D to open dev tools
// F5, Reload Current Webview // Tab switching