From b46a16ff92f6ce919c4f4ea57124b31901af128b Mon Sep 17 00:00:00 2001 From: Alex Booker Date: Sat, 15 Aug 2015 10:15:19 +0100 Subject: [PATCH] added unsupported browser warning --- password.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/password.html b/password.html index 2895e9fe..b0260a7c 100644 --- a/password.html +++ b/password.html @@ -15,6 +15,9 @@ padding: 10px; margin-bottom: 20px; } + .unsupported-browser-alert { + display: none; + } @@ -28,6 +31,11 @@ +
+

+ Hold on. It looks like you are using an unsuported browser (probably Internet Explorer...) Unfortunately, this tool will not work until you upgrade your browser. Sorry for any inconvenience caused. +

+
@@ -181,7 +189,13 @@ } }; function outputGeneratedPassword() { - var password = passwordGenerator.generatePassword(getOptions()); + var password; + try { + password = passwordGenerator.generatePassword(getOptions()); + } + catch (error) { + return $("#unsupported-browser-alert").show(); + } if (password === '') { alert("Whops. You unselected all the options. I don't know what characters you want. Click on the button entitled \"Advanced Options\" and enable some options then try again. Nice one"); return;