From 1ef821f4e7cb623ad94a152e1532615daacdfa00 Mon Sep 17 00:00:00 2001 From: Matt Colyer Date: Thu, 14 Nov 2013 10:48:45 -0800 Subject: [PATCH] Add CSS class indicating platform on body --- src/atom.coffee | 6 ++++++ 1 file changed, 6 insertions(+) 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()