mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 21:28:04 +02:00
35 lines
875 B
JavaScript
35 lines
875 B
JavaScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
/* global loop:true */
|
|
|
|
var loop = loop || {};
|
|
loop.shared = loop.shared || {};
|
|
loop.shared.utils = (function() {
|
|
"use strict";
|
|
|
|
/**
|
|
* Used for adding different styles to the panel
|
|
* @returns {String} Corresponds to the client platform
|
|
* */
|
|
function getTargetPlatform() {
|
|
var platform="unknown_platform";
|
|
|
|
if (navigator.platform.indexOf("Win") !== -1) {
|
|
platform = "windows";
|
|
}
|
|
if (navigator.platform.indexOf("Mac") !== -1) {
|
|
platform = "mac";
|
|
}
|
|
if (navigator.platform.indexOf("Linux") !== -1) {
|
|
platform = "linux";
|
|
}
|
|
|
|
return platform;
|
|
}
|
|
|
|
return {
|
|
getTargetPlatform: getTargetPlatform
|
|
};
|
|
})();
|