tsaost / autoload-temporary-addon

Automatically load temporary addons from a local directory when Firefox starts
MIT License
24 stars 4 forks source link

Wouldn't `AddonManager.installAddonFromSources` allow you to install permanently? #5

Open krackers opened 7 months ago

krackers commented 7 months ago

Looking at this old bug https://bugzilla.mozilla.org/show_bug.cgi?id=1309288 and the patch someone once wrote: https://hg.mozilla.org/mozreview/gecko/rev/520bf9586b1ea7bb2eea3430611aef15b201ef15#index_header

it seems like AddonManager already exposes a installAddonFromSources. So shouldn't we just be able to call AddonManager.installAddonFromSource once and be done with it?

krackers commented 7 months ago

In terms of how you could apply it, perhaps it might suffice to just set AddonManager.installTemporaryAddon = AddonManager.installAddonFromSources, assuming that everything is in the same JS namespace? I assume this might be the case since Mike Kaply suggests in https://mike.kaply.com/2013/05/06/dont-unpack-and-repack-omni-jar/ something similar in the comments

Yes. In theory you could create an extension that imported DownloadTaskbarProgress.jsm and then:

DownloadTaskBarProgess._shouldSetState = function() {return false;}