Skip to content

Instantly share code, notes, and snippets.

@brianleroux
Created October 6, 2011 18:17
Show Gist options
  • Save brianleroux/1268163 to your computer and use it in GitHub Desktop.
Save brianleroux/1268163 to your computer and use it in GitHub Desktop.
alunny's stopgap in gist form
(function () {
function deviceready() {
var e = document.createEvent('Events')
e.initEvent('deviceready')
document.dispatchEvent(e)
}
if (typeof PhoneGap != 'undefined') {
navigator.camera = {}
navigator.camera.getPicture = function() {
alert('sorry, camera not supported in the browser: yet!')
}
window.PhoneGap = {}
deviceready()
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment