1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 09:17:59 +01:00

normalise platform feature values

This commit is contained in:
Doug Kearns
2008-11-01 04:14:50 +00:00
parent ddabf3b84e
commit 5f90b93430

View File

@@ -549,6 +549,13 @@ const liberator = (function () //{{{
} }
} }
function getPlatformFeature()
{
let platform = navigator.platform;
return /^Mac/.test(platform) ? "MacUnix" : platform == "Win32" ? "Win32" : "Unix";
}
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PUBLIC SECTION ////////////////////////////////////////// ////////////////////// PUBLIC SECTION //////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{ /////////////////////////////////////////////////////////////////////////////{{{
@@ -1140,7 +1147,8 @@ const liberator = (function () //{{{
liberator.log("Initializing liberator object...", 0); liberator.log("Initializing liberator object...", 0);
// TODO: only checked for "Win32" currently, other values should be normalised // TODO: only checked for "Win32" currently, other values should be normalised
config.features.push(navigator.platform);
config.features.push(getPlatformFeature());
// commands must always be the first module to be initialized // commands must always be the first module to be initialized
loadModule("commands", Commands); loadModule("commands", Commands);