electron/preload.js in flammarion-0.1.10pre1 vs electron/preload.js in flammarion-0.1.10pre2

- old
+ new

@@ -1,13 +1,18 @@ // Generated by CoffeeScript 1.9.0 (function() { var error, spellcheck, webFrame; - window.$remote = require('remote'); + try { + window.$remote = require('remote'); + webFrame = require('web-frame'); + } catch (_error) { + error = _error; + window.$remote = require('electron').remote; + webFrame = require('electron').webFrame; + } - webFrame = require('web-frame'); - try { spellcheck = require('spellchecker'); webFrame.setSpellCheckProvider("en-US", true, { spellCheck: function(text) { return !spellcheck.isMisspelled(text); @@ -18,10 +23,13 @@ console.log("Could not load spellchecker: " + error); } window.onkeyup = function(e) { if (e.ctrlKey && e.keyCode === 70) { - return window.show_search_bar(); + window.show_search_bar(); + } + if (e.ctrlKey && e.shiftKey && e.keyCode === 73) { + return $remote.getCurrentWindow().toggleDevTools(); } }; }).call(this);