Sha256: a43c961ed6d0f278e8abfac805b577210eeda396d41a97b2274b6f3b143411a9

Contents?: true

Size: 1009 Bytes

Versions: 5

Compression:

Stored size: 1009 Bytes

Contents

// Generated by CoffeeScript 1.10.0
(function() {
  var error, error1, error2, spellcheck, webFrame;

  try {
    window.$remote = require('remote');
    webFrame = require('web-frame');
  } catch (error1) {
    error = error1;
    window.$remote = require('electron').remote;
    webFrame = require('electron').webFrame;
  }

  try {
    spellcheck = require('spellchecker');
    webFrame.setSpellCheckProvider("en-US", true, {
      spellCheck: function(text) {
        return !spellcheck.isMisspelled(text);
      }
    });
  } catch (error2) {
    error = error2;
    console.log("Could not load spellchecker: " + error);
  }

  window.onkeyup = function(e) {
    if (e.ctrlKey && e.keyCode === 70) {
      window.show_search_bar();
    }
    if (e.ctrlKey && e.shiftKey && e.keyCode === 73) {
      $remote.getCurrentWindow().toggleDevTools();
    }
    if (e.code === "F11") {
      return $remote.getCurrentWindow().setFullScreen(!$remote.getCurrentWindow().isFullScreen());
    }
  };

}).call(this);

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
flammarion-0.2.1 electron/preload.js
flammarion-0.2.0 electron/preload.js
flammarion-0.1.14 electron/preload.js
flammarion-0.1.13 electron/preload.js
flammarion-0.1.12 electron/preload.js