Frage

I have a Phonegap app that I am developing and I would love to be able to tell the difference between one built on their server and one built locally on my machine.

Is there anything in the DOM that might give this information away?

War es hilfreich?

Lösung

Found a solution, whilst its not with the DOM its the only way I can see of checking which version I am in...

    $.ajax({
        url:'file:///android_asset/www/icon-72-2x.png',
        type:'HEAD',
        error: function()
        {
            //file does not exists
        },
        success: function()
        {
            //file exists
        }
    });

Only works with Android, but paths can be changed to match iPhone and the other devices as well.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top