Closed Bug 230416 Opened 22 years ago Closed 21 years ago

Mechanism to identify application for extension authors

Categories

(SeaMonkey :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: BijuMailList, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030811 Mozilla Firebird/0.6.1+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030811 Mozilla Firebird/0.6.1+ As extensions like QuickManager can be installed in Moz/Fb/Tb We need a mechanism for extension developers to identify which is the actual application running it. Right now I check value of navigator.vendor but extensions like Multizilla changes this property see http://mozdev.org/bugs/show_bug.cgi?id=5382 See discussion http://forums.mozillazine.org/viewtopic.php?t=29081 Reproducible: Always Steps to Reproduce:
Hm, also i think this bug is invalid some comment to this. Even if we would create a new pref, Multizilla could also change this pref, so i think this is more a Multizilla bug.
Summary: navigator.vendor : Mechanism to identify application → navigator.vendor : Mechanism to identify application
> Hm, also i think this bug is invalid some comment to this. I agree, it not a bug, but an ISSUE. ie, We need foolprof Mechanism > Even if we would create a new pref, Multizilla could also > change this pref, so i think this is more a Multizilla bug. notified Multizilla team.
bug# 230431 of Firebird is related to this
Severity: normal → enhancement
as noted in the Firebird bug, navigator.vendor is inappropriate due to how it is already used by Netscape, Firebird, and other embeddors. Breaking the defined usage of that value by locking it into place isn't the best way of creating a suitable interface for extension authors. However, such a mechanism is certainly needed instead of the various workarounds currently being used. See http://www.mozilla.org/docs/dom/domref/dom_window_ref50.html for the specification.
Summary: navigator.vendor : Mechanism to identify application → Mechanism to identify application for extension authors
It can be simple as for Mozilla navigator.products ={Gecko:true, Mozilla:true}; for Firebird navigator.products ={Gecko:true, Firebird:true}; for Thunderbird navigator.products ={Gecko:true, Thunderbird:true}; for Sunbird navigator.products ={Gecko:true, Sunbird:true}; and other embeddors can extend it like navigator.products.MultiZilla = true; we should also get similar facility in install.js
confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: 230431
> navigator.products ={Gecko:true, Mozilla:true}; s/Mozilla/SeaMonkey/ Also add a value for "xul apps", so that you can generically check for firefox, thunderbird and any new apps that may be created, e.g. navigator.products ={Gecko:true, XULApp: true, Firefox:true}; This should then not be defined for Seamonkey, only apps basing on XRE and the new toolkit, or however it's called. The object should be available for XPInstall scripts in XPIs.
No longer blocks: 230431
Product: Browser → Seamonkey
For toolkit-based apps starting with Fx/Tb 1.1, nsIXULAppInfo serves this purpose: Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIXULAppInfo); The ID property of the resulting object contains the GUID of the application and would surely be the safest choice. Of course, you'd need some fallback for pre-1.1 apps and Seamonkey. As this was fixed by some other checkin to some other bug, resolving as WFM.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.