javascript to add QR code as a widget

Paste this code into a text widget to put a qr code on each page.

<script type="text/javascript">
var url=encodeURIComponent(window.location);
var qr="<img style=\"maxwidth:100%\" src=\"https://chart.googleapis.com/chart?chs=240x240&cht=qr&chl="+url+"&choe=UTF-8\"/>";
document.open();
document.write(qr);
document.close();
</script>

Leave a Reply