Install Chrome Store Web Apps with JavaScript
Being able to install Firefox OS web apps from any domain, not just the platform app store, is a giant step forward in mobile app marketing and freedom. Firefox OS allows installing apps from any or all domains, and it just so happens that the Chrome Web Store allows JavaScript-triggered app installation as well.
JavaScript Install Code
The chrome.webstore.install
method accepts three parameters, the install URL, the success callback, and the error callback:
/* Chrome installation */
var chromeInstallUrl = "path/to/chrome/app";
chrome.webstore.install(chromeInstallUrl,
function() {
// Success!
}, function(err) {
// Error :(
});
The code above triggers installation of the Chrome web app at the given location. The obvious difference from Firefox OS app installation is that callbacks are included in the initial call here, instead of adding adding onsuccess and onerror methods to a resulting install object.
With CSS border-radius, I showed you how CSS can bridge the gap between design and development by adding rounded corners to elements. CSS gradients are another step in that direction. Now that CSS gradients are supported in Internet Explorer 8+, Firefox, Safari, and Chrome...
I was inspired when I first saw Addy Osmani's original ShineTime blog post. The hover sheen effect is simple but awesome. When I started my blog redesign, I really wanted to use a sheen effect with my logo. Using two HTML elements and...
CSS sprites are all the rage these days. And why shouldn't be? They're easy to implement, have great upside, and usually take little effort to create. Dave Shea wrote an epic CSS sprites navigation post titled CSS Sprites2 - It's JavaScript Time.
For the longest time, developers were frustrated by elements with overflow not being scrollable within the page of iOS Safari. For my blog it was particularly frustrating because I display my demos in sandboxed IFRAMEs on top of the article itself, so as to not affect my site's...