From b2f1f04b5409b8106af7f9659ca11bcc7378a179 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 4 Dec 2011 15:33:56 +0000 Subject: [PATCH] Add support for hiding QR code via a parameter --- static/js/pad2.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/static/js/pad2.js b/static/js/pad2.js index 5d436dddd..debd25512 100644 --- a/static/js/pad2.js +++ b/static/js/pad2.js @@ -21,6 +21,7 @@ var LineNumbersDisabled = false; var noColors = false; var useMonospaceFontGlobal = false; var globalUserName = false; +var hideQRCode = false; $(document).ready(function() { @@ -86,6 +87,7 @@ function getParams() var showLineNumbers = params["showLineNumbers"]; var useMonospaceFont = params["useMonospaceFont"]; var IsnoColors = params["noColors"]; + var hideQRCode = params["hideQRCode"]; if(IsnoColors) { @@ -129,6 +131,10 @@ function getParams() // If the username is set as a parameter we should set a global value that we can call once we have initiated the pad. globalUserName = unescape(userName); } + if(hideQRCode) + { + $('#qrcode').hide(); + } } function getUrlVars()