Skip to content

Instantly share code, notes, and snippets.

@xagronaut
Last active August 29, 2015 14:27
Show Gist options
  • Save xagronaut/59e220da417b5292b73a to your computer and use it in GitHub Desktop.
Save xagronaut/59e220da417b5292b73a to your computer and use it in GitHub Desktop.
Bookmarklets - including "Add QR code" for the current page for printing or sharing over-the-shoulder
<html>
<head>
<title>Add QR Code - by Jeffrey A. Miller</title>
<!-- the bookmarklet logic is mine; the formatted bookmarklet link was produced with help from
Bookmarklet Creator with Script Includer
http://mrcoles.com/bookmarklet/
It's a very awesome tool! Check it out!
-->
<style type='text/css'>
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt;
}
</style>
</head>
<body>
<h1>Add QR Code bookmarklet</h1>
<p>Drag the link below to your browser's toolbar or save it to your 'Favorites'. Then click it!</p>
<p>By clicking the link, you'll add the current page's URL as a QR code in the upper right-hand corner of the current page.</p>
<p>This way, when you want to print the page, someone with a smart phone can scan it if they want to learn more about the page. It also works onscreen too, if you're showing a page to someone.</p>
<ul>
<li><a href="javascript:(function()%7Bfunction callback()%7B(function(%24)%7Bvar jQuery%3D%24%3B(%24('%23pageQrCode').length %3F %24('%23pageQrCode') %3A %24('<img id%3D\'pageQrCode\' %2F>').appendTo('body')).attr('src'%2C 'http%3A%2F%2Fqrfree.kaywa.com%2F%3Fl%3D1%26s%3D8%26d%3D' %2B encodeURIComponent(window.location)).css(%7B position%3A 'absolute'%2C top%3A 0%2C zoom%3A 0.4%2C zIndex%3A 9999%2C right%3A 0 %7D)%7D)(jQuery.noConflict(true))%7Dvar s%3Ddocument.createElement('script')%3Bs.src%3D'https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.7.1%2Fjquery.min.js'%3Bif(s.addEventListener)%7Bs.addEventListener('load'%2Ccallback%2Cfalse)%7Delse if(s.readyState)%7Bs.onreadystatechange%3Dcallback%7Ddocument.body.appendChild(s)%3B%7D)()">Add QR Code</a></li>
</ul>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment