Update MissingPlugin for Firefox 15 Review by: acleung@google.com git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11254 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/plugins/MissingPlugin/war/MissingPlugin.html b/plugins/MissingPlugin/war/MissingPlugin.html index 46ccb3e..eb709ae 100644 --- a/plugins/MissingPlugin/war/MissingPlugin.html +++ b/plugins/MissingPlugin/war/MissingPlugin.html
@@ -35,7 +35,7 @@ "firefox-old" : { - "caption" : "Sorry, the GWT Developer Plugin only supports Firefox 3.0 - 10.0 at present", + "caption" : "Sorry, the GWT Developer Plugin only supports Firefox 3.0 - 15.0 at present", "url" : "http://www.getfirefox.com", "supported" : false }, @@ -171,17 +171,15 @@ } else if (ua.indexOf("opera") != -1) { id = 'opera'; } else if (ua.indexOf("gecko") != -1) { - if (ua.indexOf("rv:1.9") != -1 || - ua.indexOf("rv:2.0") != -1 || - ua.indexOf("rv:5.0") != -1 || - ua.indexOf("rv:6.0") != -1 || - ua.indexOf("rv:7.0") != -1 || - ua.indexOf("rv:8.0") != -1 || - ua.indexOf("rv:9.0") != -1 || - ua.indexOf("rv:10.0") != -1) { - id = 'firefox'; - } else { - id = 'firefox-old'; + // Note: Gecko version != Firefox version before 5.0. + // See: https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference + var gecko_versions = ["1.9", "2.0", "5.0", "6.0", "7.0", "8.0", "9.0", "10.0", "11.0", "12.0", "13.0", "14.0", "15.0"]; + id = 'firefox-old'; + for (var i = 0; i < gecko_versions.length; i++) { + if (ua.indexOf("rv:" + gecko_versions[i]) != -1) { + id = 'firefox'; + break; + } } } downloadInfo.inferredDownloadId = id; @@ -193,7 +191,7 @@ <noscript> <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif"> The Google Web Toolkit Developer Plugin does not appear to be installed. - However, you also don't seem to have a browser that is willing to run JavaScript. + Also, you also don't seem to have a browser that is willing to run JavaScript. Please enable JavaScript or switch to a browser that supports JavaScript and try again. </div> </noscript>