Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Brackets should recognize Linux as a platform #1983

Merged
merged 2 commits into from
Oct 30, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/utils/Global.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ define(function (require, exports, module) {

global.brackets.inBrowser = !global.brackets.hasOwnProperty("fs");

global.brackets.platform = (global.navigator.platform === "MacIntel" || global.navigator.platform === "MacPPC") ? "mac" : "win";
if (global.navigator.platform === "MacIntel" || global.navigator.platform === "MacPPC") {
global.brackets.platform = "mac";
} else if (global.navigator.platform.indexOf("Linux") >= 0) {
global.brackets.platform = "linux";
} else {
global.brackets.platform = "win";
}

global.brackets.getLocale = function () {
// By default use the locale that was determined in brackets.js
Expand Down Expand Up @@ -99,4 +105,4 @@ define(function (require, exports, module) {
global.brackets.getModule = require;

exports.global = global;
});
});