Uncaught ReferenceError: device is not defined
Above is the Error I receive when using this: device.model
I have installed the plugin correctly, I have cordova.js
in my HTML file...
I Basically want to use this code after the device is ready...
model = device.model;
alert(model); // shows: iPhone7,1 or whatever
if (model === iPhone7,1) {
var imgData=ctx.getImageData(0,0,3*x,3*365*Yf);
} else {
var imgData=ctx.getImageData(0,0,2*x,2*365*Yf);
}
FULL CODE: https://github.com/GunZi200/Memory-Colour/blob/master/test.js
HTML: https://github.com/GunZi200/Memory-Colour/blob/c1b95d60510302a5367ae2ae6137c2d840d99c60/index.html
Aucun commentaire:
Enregistrer un commentaire