Last active
December 14, 2015 18:28
-
-
Save paoloboschini/5129328 to your computer and use it in GitHub Desktop.
Web MoSync Live
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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>Wormhole Template App</title> | |
<link rel="stylesheet" href="http://people.dsv.su.se/~pabo9696/live/style.css" type="text/css" media="screen" title="no title" charset="utf-8"> | |
</head> | |
<body> | |
<div id="screen"> | |
<div class="pane" id="heading">Customized Wormhole Technology</div> | |
<div class="pane" id="info"> | |
<div class="infoItem">Platform: <span id="platform"> </span></div> | |
<div class="infoItem">Version: <span id="version"> </span></div> | |
<div class="infoItem">UUID: <span id="uuid"> </span></div> | |
<div class="infoItem">Name: <span id="name"> </span></div> | |
<div class="infoItem">Width: <span id="width"> </span></div> | |
<div class="infoItem">Height: <span id="height"> </span></div> | |
</div> | |
<div class="pane button" onclick="vibrate()">Vibrate</div> | |
<div class="pane button" onclick="beep()">Beep</div> | |
<div class="pane button" onclick="changeColor()">Change Color</div> | |
</div> | |
<script type="text/javascript"> | |
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 = 'ZXSWEEWSascreen.height'; | |
function vibrate() { | |
navigator.notification.vibrate(2000); | |
} | |
function changeColor() { | |
var color = "#" + | |
(Math.random() * 0xFFFFFF + 0x1000000) | |
.toString(16).substr(1,6); | |
document.documentElement.style.backgroundColor = color; | |
document.body.style.backgroundColor = color; | |
} | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment