[Commits] r2541 - sandbox/cmoullet/ux/MobileEvents
commits at geoext.org
commits at geoext.org
Tue Dec 28 07:19:18 CET 2010
Author: cmoullet
Date: 2010-12-28 07:19:18 +0100 (Tue, 28 Dec 2010)
New Revision: 2541
Added:
sandbox/cmoullet/ux/MobileEvents/mobileEmulators.html
Modified:
sandbox/cmoullet/ux/MobileEvents/eventTester.js
Log:
Improve detection script and add user agent
Modified: sandbox/cmoullet/ux/MobileEvents/eventTester.js
===================================================================
--- sandbox/cmoullet/ux/MobileEvents/eventTester.js 2010-12-28 04:58:12 UTC (rev 2540)
+++ sandbox/cmoullet/ux/MobileEvents/eventTester.js 2010-12-28 06:19:18 UTC (rev 2541)
@@ -38,13 +38,30 @@
})();
function w(category, name, element) {
- document.write('<tr><td>' + category + '</td><td>' + name + '</td><td> ' + (
+ // Use eventTester.html?resultonly=true or eventTester.html
+ document.write('<tr>');
+ if (!getUrlParam('resultonly')) {
+ document.write('<td>' + category + '</td><td>' + name + '</td> ');
+ }
+ document.write('<td>' + (
isEventSupported(name, element)
? '<span style="background-color:green;color:white;">true</span></td>'
: '<span style="background-color:red;color:white;">false</span></td>'
- ) + '<tr>');
+ ));
+ document.write('<tr>');
}
+function getUrlParam(param)
+{
+ param = param.replace(/([\[\](){}*?+^$.\\|])/g, "\\$1");
+ var regex = new RegExp("[?&]" + param + "=([^&#]*)");
+ var url = decodeURIComponent(window.location.href);
+ var match = regex.exec(url);
+ return match ? match[1] : "";
+}
+
+document.write('User agent: ' + navigator.userAgent + '<br>');
+
document.write("<table>");
w('mouse', 'click');
Added: sandbox/cmoullet/ux/MobileEvents/mobileEmulators.html
===================================================================
--- sandbox/cmoullet/ux/MobileEvents/mobileEmulators.html (rev 0)
+++ sandbox/cmoullet/ux/MobileEvents/mobileEmulators.html 2010-12-28 06:19:18 UTC (rev 2541)
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Mobile Event Tester </title>
+</head>
+<body>
+<h1>List of mobile emulators</h1>
+<a href="http://www.mobilexweb.com/emulators">All emulators</a><br>
+<a href="https://sso.forum.nokia.com/login?service=http://apu.ndhub.net/%3Fmethod%3Dcas">Remode device access from
+ Nokia</a><br>
+<a href="http://www.opera.com/mobile/demo/">Opera Mini Mobile</a><br>
+<a href="http://www.deviceanywhere.com/">Device anywhere</a><br>
+<a href="http://www.perfectomobile.com">Perfecto mobile</a>
+</body>
+</html>
+
More information about the Commits
mailing list