mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-21 00:15:41 +02:00
normalise platform feature values
This commit is contained in:
1 parent
ddabf3b84e
commit
5f90b93430
1 file changed
+9
-1
@@ -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);
|
||||||
|
|||||||
Reference in new issue
Block a user