mirror of
https://github.com/atom/atom.git
synced 2026-01-26 23:38:48 -05:00
Add CSS class indicating platform on body
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user