Monday, November 7, 2011

QR code blogger widget


If you want to embed qr code widget, which contains your current page URL.
Add gadget with the name HTLM/javasript and copy the following text inside:






<script type="text/javascript">
        // use current location as data
        var chl = new String(document.location);
        position = chl.indexOf('#',0);
        if (pos >= 0) {
            chl = chl.substr(0,pos);
        }
             chl  = escape(chl); // escaped data
        var chs  = '150x150'; // Size: The largest possible area.
        var choe = 'UTF-8'; // Charset: Shift_JIS, UTF-8, or ISO-8859-1
        var chld = 'L'; // L - 7% size of a QR code to be restored, M - 15%, Q - 25%, H - 30%
        var margin = 4; // margin in rows/columns
        document.write(unescape('%3Cimg 
src="http://chart.apis.google.com/chart?chs='+chs+'&cht=qr&chl='+chl+
'&choe='+choe+'&chld='+chld+'|'+margin+'" alt="QR Code" /%3E'));
</script>