How to mark extension to be removed next time when Firefox started?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to mark extension to be removed next time when Firefox started?

Tomasz Pyra
I know that hand made uninstall of extension is hard thing to do.

But maybe there is possibility to mark extension as "to remove" (same as
when I do it from menu tools->extensions->uninstall)?
_______________________________________________
Mozilla-xpinstall mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-xpinstall
Reply | Threaded
Open this post in threaded view
|

Re: How to mark extension to be removed next time when Firefox started?

Tomasz Pyra
Tomasz Pyra napisał(a):
> I know that hand made uninstall of extension is hard thing to do.
>
> But maybe there is possibility to mark extension as "to remove" (same as
> when I do it from menu tools->extensions->uninstall)?

I found solution:

in Extensions.rdf file I need to add attribute:
em:toBeUninstalled="true" into RDF tag containing informations about
plugin, and change "Components List Changed" attribute from 0 to 1 in
file compatibility.ini in profile directory of current user.

Is this good solution? Plugin is removed next time when firefox is
started in that profile, so for me it works.
_______________________________________________
Mozilla-xpinstall mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-xpinstall
Reply | Threaded
Open this post in threaded view
|

Re: How to mark extension to be removed next time when Firefox started?

Karsten Düsterloh
Tomasz Pyra aber hob zu reden an und schrieb:
> in Extensions.rdf file I need to add attribute:
> em:toBeUninstalled="true" into RDF tag containing informations about
> plugin, and change "Components List Changed" attribute from 0 to 1 in
> file compatibility.ini in profile directory of current user.
>
> Is this good solution? Plugin is removed next time when firefox is
> started in that profile, so for me it works.

Sounds pretty hackish, given that you could just call the EM (eg. see
bottom of
<http://www.mozdev.org/source/browse/mnenhy/src/bin/chrome/mnenhy/content/mnenhy/mnenhy-pref-main.js?rev=1.9&content-type=text/x-cvsweb-markup>):

// remove Mnenhy from the Aviary's Extension Manager
try
{
  const ksEMClassID = "@mozilla.org/extensions/manager;1";
  const ksEMIID     = "nsIExtensionManager";
  if (ksEMClassID in Components.classes
      && ksEMIID in Components.interfaces)
  {
    const koEMService = Components.classes[ksEMClassID]
                        .getService(Components.interfaces[ksEMIID]);
    if ("uninstallExtension" in koEMService)
      // up to nsIExtensionManager.idl 1.25
      koEMService.uninstallExtension(goMnenhy.ksMnenhyUUID);
    else if ("uninstallItem" in koEMService)
      // since nsIExtensionManager.idl 1.26
      koEMService.uninstallItem(goMnenhy.ksMnenhyUUID);
  }
  goMnenhy.Log("UninstallMnenhy: successfully removed from EM");
}
catch(oErr)
{
  goMnenhy.Log("UninstallMnenhy: removing from EM failed:" + oErr);
}


Karsten
--
       Freiheit stirbt        |       Fsayannes SF&F-Bibliothek:
            Mit Sicherheit    |       http://fsayanne.tprac.de/
_______________________________________________
Mozilla-xpinstall mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-xpinstall