Closed hasanmerkit closed 1 year ago
In the meantime there is no support for PiluX, but you can add it now using extension: https://github.com/faisalman/ua-parser-js#extending-regex
const result = UAParser("Mozilla/5.0 (X11; PiluX; Ubuntu; Linux x86_64; rv:108.0) PiluX/2.1 PiluXServer/2.1 Gecko/20100101 Firefox/108.0",
{
os : [[/(pilux)\/([\d\.]+)/i], [UAParser.OS.NAME, UAParser.OS.VERSION]]
});
console.log(result.os); // { name: "PiluX", version: "2.1" }
Thanks for reply @faisalman , Do we have to wait for the operating system to become popular for PiluX support to be added?
Hi,
We have been creating Operating System (Ubuntu based) for few years. We have planned to release it to public in summer 2023.
Our OS is using its own "User Agent String" in browsers, so can ua-parser-js add support? You can learn with this examples written below how to detect PiluX operating system.
Examples used HTML page: https://www.teteos.net/test (This page using ua-parser-js javascript library.)
Ubuntu 22.04, Firefox 108: User Agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0
PiluX version v2.1, Firefox 108: This should be: User Agent:
Mozilla/5.0 (X11; PiluX; Ubuntu; Linux x86_64; rv:108.0) PiluX/2.1 PiluXServer/2.1 Gecko/20100101 Firefox/108.0
PiluX Server version v2.1, Firefox 108: This should be: User Agent:
Mozilla/5.0 (X11; PiluX; Ubuntu; Linux x86_64; rv:108.0) PiluX/2.1 PiluXServer/2.1 Gecko/20100101 Firefox/108.0
UA string usage from PiluX: Mozilla/5.0 ([Window System, "X11" or "Wayland"]; PiluX; [PiluX some versions Ubuntu, Debian, PopOS or Linux Mint Based], Linux [arch]; rv:[Firefox or Engine Version]) PiluX/[VersionNo Integer] Gecko/[Gecko Version] Firefox/[Firefox Version]
If InString("PiluXServer"){ "PiluX Server" } else { "PiluX" }