Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create a QR Code for the current page, so it can be easily scanned by other devices.
javascript:(function(){var%20e=document.createElement("div");e.setAttribute("id","qrcode");e.setAttribute("style","box-sizing:content-box;position:fixed;top:0;left:0;z-index:99993;width:100%;height:100%;padding-top:50px;text-align:center;background-color:rgba(0,0,0,.5);box-sizing:border-box;");e.innerHTML='<img%20style="box-sizing:content-box;box-shadow:0%200%2020px%20#000;"%20src="//api.qrserver.com/v1/create-qr-code/?data='+encodeURIComponent(window.location)+'&size=500x500"%20/>'+"<div%20style=\"box-sizing:content-box;position:absolute;top:10px;right:10px;color:#fff;font-size:20px;width:20px;height:20px;line-height:20px;text-align:center;cursor:pointer;font-weight:bold;background-color:#333;padding:3px;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);transform:rotate(-45deg);border-radius:20px;border:4px%20solid%20#fff;box-shadow:0%200%2020px%20#000;\"%20onclick=\"document.getElementById('qrcode').parentNode.removeChild(document.getElementById('qrcode'));\">+";document.body.appendChild(e)})()
@aarontgrogg

This comment has been minimized.

Copy link
Owner Author

@aarontgrogg aarontgrogg commented Nov 12, 2014

Update to switch from Google Chart API (to be deprecated in 2015: https://developers.google.com/chart/terms) to goQR.me; thanks to Peter (http://www.difficultdecisions.de/) for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.