Created
May 12, 2014 19:57
-
-
Save ovizii/eb9c2cdbfa5d43373ebc to your computer and use it in GitHub Desktop.
Add this javascript to add QR code as a widget
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment