electron/preload.coffee in flammarion-0.2.1 vs electron/preload.coffee in flammarion-0.3.0

- old
+ new

@@ -1,23 +1,23 @@ -try - window.$remote = require('remote') - webFrame = require('web-frame') -catch error - window.$remote = require('electron').remote - {webFrame} = require('electron') - -try - spellcheck = require('spellchecker') - webFrame.setSpellCheckProvider("en-US", true, { - spellCheck: (text) -> - return !spellcheck.isMisspelled(text) - }) -catch error - console.log("Could not load spellchecker: #{error}") - -window.onkeyup = (e) -> - if e.ctrlKey and e.keyCode is 70 - window.show_search_bar() - if e.ctrlKey and e.shiftKey and e.keyCode is 73 - $remote.getCurrentWindow().toggleDevTools() - if e.code is "F11" - $remote.getCurrentWindow().setFullScreen(!$remote.getCurrentWindow().isFullScreen()) +try + window.$remote = require('remote') + webFrame = require('web-frame') +catch error + window.$remote = require('electron').remote + {webFrame} = require('electron') + +try + spellcheck = require('spellchecker') + webFrame.setSpellCheckProvider("en-US", true, { + spellCheck: (text) -> + return !spellcheck.isMisspelled(text) + }) +catch error + console.log("Could not load spellchecker: #{error}") + +window.onkeyup = (e) -> + if e.ctrlKey and e.keyCode is 70 + window.show_search_bar() + if e.ctrlKey and e.shiftKey and e.keyCode is 73 + $remote.getCurrentWindow().toggleDevTools() + if e.code is "F11" + $remote.getCurrentWindow().setFullScreen(!$remote.getCurrentWindow().isFullScreen())