diff --git a/src/atom.coffee b/src/atom.coffee index ec7e420ea..08295ed0c 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -44,6 +44,7 @@ class Atom initialize: -> @unsubscribe() + @setBodyPlatformClass() {devMode, resourcePath} = atom.getLoadSettings() configDirPath = @getConfigDirPath() @@ -68,6 +69,11 @@ class Atom @pasteboard = new Pasteboard() @syntax = deserialize(@getWindowState('syntax')) ? new Syntax() + # Private: + setBodyPlatformClass: -> + bodyEl = document.getElementsByTagName('body')[0] + bodyEl.classList.add("platform-#{process.platform}") + getCurrentWindow: -> remote.getCurrentWindow()