Add script that detects if cordova.js should be injected

This solves the issue of having cordova.js loaded when developing on the browser and having some features such as geolocation breaking. 
not sure if i get my hands on one i will test