Files
atom/src/window-load-settings-helpers.coffee
2016-02-18 09:17:34 -08:00

12 lines
359 B
CoffeeScript

{remote} = require 'electron'
_ = require 'underscore-plus'
windowLoadSettings = null
exports.getWindowLoadSettings = ->
windowLoadSettings ?= JSON.parse(window.decodeURIComponent(window.location.hash.substr(1)))
exports.setWindowLoadSettings = (settings) ->
windowLoadSettings = settings
location.hash = encodeURIComponent(JSON.stringify(settings))