electron/preload.coffee in flammarion-0.1.10pre1 vs electron/preload.coffee in flammarion-0.1.10pre2
- old
+ new
@@ -1,17 +1,21 @@
-window.$remote = require('remote')
+try
+ window.$remote = require('remote')
+ webFrame = require('web-frame')
+catch error
+ window.$remote = require('electron').remote
+ {webFrame} = require('electron')
-webFrame = require('web-frame')
-
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()