Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve done it by replacing the relevant popup conditional with ‘false’.

    In the comprehensive-google-map-plugin/assets/js/cgmp.framework.min.js file, I replaced this bit of code (near the end of the file, line 33 in my editor):

    m=parseFloat(a.fn.jquery);if(1.3>m)return alert(i.oldJquery),!1;

    with this:

    m=parseFloat(a.fn.jquery);if(false)return alert(i.oldJquery),!1;

    By doing this, the conditional that checks the version always returns false, which in this case means ‘not a problem’, and so the alert doesn’t appear.

    The change is applied to the .min.js file because that’s the one the plugin actually loads.

    Because the file is minimized, everything all runs together, so you’ll want to work carefully.

    This isn’t an actual fix, of course; it just silences the Javascript alert() popup.

    Agreed. The problem seems to be in the use of parseFloat, which sees (for example) “1.10.1” and returns “1.1”.

    You will not be able to do a straight numerical greater-than/less-than comparison using jQuery’s version number string format. This plugin should use a different method to compare versions, one which splits up the string and compares the major, minor and increment separately, as discussed here:

    https://stackoverflow.com/questions/1073423/jquery-plugin-check-version/3113749#3113749

    In particular:

    https://phpjs.org/functions/version_compare/

Viewing 2 replies - 1 through 2 (of 2 total)