diff --git a/index.html b/index.html
index e6d8dbaca1973094b41bab9b4f52d0787d273328..5e2873d8749f8bd8c2360f18ed3b1f9369716ccb 100644
--- a/index.html
+++ b/index.html
@@ -20,8 +20,9 @@
 	<script type="text/javascript" src="js/qrcode.min.js"></script>
 
 	<script type="text/javascript">
+	var qrcode;
 	function generateQR() {
-		var qrcode = new QRCode(document.getElementById("qrcode"), location.hash.substring(1));
+		qrcode = new QRCode(document.getElementById("qrcode"), location.hash.substring(1));
 	}
 	$( document ).ready(function() {
 		generateQR();