Evan Shortiss
Software Engineer and Mobile Developer. Works at FeedHenry
For Node.js & Hybrid Applications
* {
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-tap-highlight-color: transparent; /* Required for certain Android devices */
}
<!-- In HTML -->
<meta name="viewport" content="width=device-width;
initial-scale=1.0; maximum-scale=1.0;">
/* In CSS */
@-viewport {
width: device-width;
}
iOS 7/8
iOS 6
var iPhoneRegex = /iPhone OS [0-6]/
var iPadRegex = /iPad; CPU OS [0-6]/
var ua = navigator.userAgent;
if (!ua.match(iPhoneRegex) && !ua.match(iPadRegex)) {
// Device version is greater than 6
document.body.style.marginTop = "20px";
} else {
// Apply possible iOS 6 styles
}
// Cordova "device" plugin required to get device information
if (window.device.platform === 'iOS' && window.device.version >= 7.0) {
document.body.style.marginTop = "20px";
}
var user = {
name: 'Evan',
age: 24
};
console.log('We have a user object!')
console.dir(user);
if (user.age < 25) {
console.error('User "%s" is under 25', user.name);
}
eshortiss@Evans-MacBook-Pro:~/$ node console.js
We have a user object!
{ name: 'Evan', age: 24 }
User "Evan" is under 25
var user = {
name: 'Evan',
age: 24
};
process.stdout.write('We have a user object!\n')
process.stdout.write(JSON.stringify(user) + '\n');
if (user.age < 25) {
process.stderr.write('User ' + user.name + ' is under 25\n');
}
* Shameless self promotion
By Evan Shortiss
A quick slide covering Logging for FeedHenry Node.js applications, UI Frameworks and a quick summary of UI gotchas for Hybrid mobile apps
Software Engineer and Mobile Developer. Works at FeedHenry