From 67562eef8d2148808a4d0a0969852f90f33b34a1 Mon Sep 17 00:00:00 2001 From: "robert%accettura.com" Date: Wed, 18 May 2005 13:49:34 +0000 Subject: [PATCH] Bug 294543 Reporter Doesn't get the Correct Product Name r=mconnor a=asa --- .../resources/content/reporter/reportWizard.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/extensions/reporter/resources/content/reporter/reportWizard.js b/extensions/reporter/resources/content/reporter/reportWizard.js index 9ef2096db7c..0c11b9c29f2 100644 --- a/extensions/reporter/resources/content/reporter/reportWizard.js +++ b/extensions/reporter/resources/content/reporter/reportWizard.js @@ -346,6 +346,17 @@ function getProduct() { .getProtocolHandler('http') .QueryInterface(Components.interfaces.nsIHttpProtocolHandler).misc.substring(3); } - - return navigator.vendor+'/'+navigator.vendorSub; + // Firefox < 1.0+ + else if (navigator.vendor != ''){ + return window.navigator.vendor+'/'+window.navigator.vendorSub; + } + // Firefox 1.0+ + try { + var prefs = Components.classes["@mozilla.org/preferences-service;1"]. + getService(Components.interfaces.nsIPrefService); + return prefs.getCharPref("general.useragent.extra.firefox"); + } + catch(ex) { + return "Unknown"; + } }