<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=320; user-scalable=no" /> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/> | |
<title>Cordova Tests</title> | |
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8"/> | |
<script type="text/javascript" charset="utf-8" src="cordova-1.6.0.js"></script> | |
<script type="text/javascript"> | |
function init() | |
{ | |
document.addEventListener("deviceready",onDeviceReady,false); | |
document.addEventListener("backbutton",onBackButton,false); | |
} | |
function onBackButton() | |
{ | |
console.log("onBackButton"); | |
} | |
function onDeviceReady(e) | |
{ | |
updateDeviceInfo(); | |
console.log("deviceready event fired!"); | |
} | |
function updateDeviceInfo() | |
{ | |
document.getElementById("platform").innerHTML = device.platform; | |
document.getElementById("version").innerHTML = device.version; | |
document.getElementById("uuid").innerHTML = device.uuid; | |
document.getElementById("name").innerHTML = device.name; | |
document.getElementById("width").innerHTML = screen.width; | |
document.getElementById("height").innerHTML = screen.height; | |
document.getElementById("colorDepth").innerHTML = screen.colorDepth; | |
document.getElementById("cordovaVersion").innerHTML = device.cordova; | |
}; | |
</script> | |
</head> | |
<body onLoad="init();" id="stage" class="theme"> | |
<h1>PhoneGap Tests</h1> | |
<div id="info"> | |
<h4>Platform: <span id="platform"></span></h4> | |
<h4>Version: <span id="version"></span></h4> | |
<h4>UUID: <span id="uuid"></span></h4> | |
<h4>Name: <span id="name"></span></h4> | |
<h4>Width: <span id="width"></span> | |
, Height: <span id="height"></span> | |
, Color Depth: <span id="colorDepth"></span> | |
</h4> | |
<h4>CordovaVersion:<span id="cordovaVersion"></span></h4> | |
</div> | |
<a href="autotest/index.html" class="btn large">Automatic Test</a> | |
</body> | |
</html> |