79746304

Date: 2025-08-26 00:55:52
Score: 1.5
Natty:
Report link

The issue lies in the library, to be more specific, the regex that grabs the Android version.

As noted by @loremus, this library is no longer maintained and should not be used.

But to fix the issue, look for /android ([0-9]\.[0-9])/i) as in the snippet below, and change it to /android ([0-9]+(?:\.[0-9]+)?)/i

function _getAndroid() {
    var android = false;
    var sAgent = navigator.userAgent;
    if (/android/i.test(sAgent)) { // android
        android = true;
        var aMat = sAgent.toString().match(/android ([0-9]\.[0-9])/i);
        if (aMat && aMat[1]) {
            android = parseFloat(aMat[1]);
        }
    }
    return android;
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @loremus
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: izlim