Paste image from clipboard into browser

// window.addEventListener('paste', ... or
document.onpaste = function(event){
    var items = (event.clipboardData || event.originalEvent.clipboardData).items;
    console.log(JSON.stringify(items)); // will give you the mime types
    var blob = items[0].getAsFile();
    var reader = new FileReader();
    reader.onload = function(event){
        console.log(}; // data url!


Media queries in javascript using window.matchMedia()

Window.matchMedia() returns a new MediaQueryList object representing the parsed results of the specified media query string.

if (window.matchMedia("(min-width: 400px)").matches) {
    /* the view port is at least 400 pixels wide */
} else {
    /* the view port is less than 400 pixels wide */

Mozilla API documentation:

WebView-based Applications for Web Developers

Getting started with the Android WebView is fairly simple, whether you want load a remote URL or display pages stored in your app.

This tutorial walks you through creating a new Android Project, adding a WebView, loading a remote URL, and then loading a local HTML page.