Page 6 of 7

Re: [Signed fixed extension attached] CB broken on Firefox 4

PostPosted: Sat Sep 30, 2017 12:17 am
by trapper john
@ morat, rather than install CB through the addon page I just go to the extension folder in the profile, delete the old version and copy in the new one (with the right name: "custombuttons@xsms.org"), then restart firefox. I too was having a problem with the signed version, even using the method of copying it into the extension folder as firefox wouldn't recognize it but the unsigned one works fine.

Re: [Signed fixed extension attached] CB broken on Firefox 4

PostPosted: Sat Sep 30, 2017 4:08 am
by morat
@trapper john

I'm using a fresh install so I can't delete the old version.

Are you using Fx Nightly 57 or Fx Beta 57?

I think the extensions.legacy.enabled preference is only for Fx Nightly 57, not Fx Beta 57.

http://forums.mozillazine.org/viewtopic ... #p14768507

Re: [Signed fixed extension attached] CB broken on Firefox 4

PostPosted: Sat Sep 30, 2017 1:15 pm
by trapper john
The profile I'm using now with nightly v58 was carried over from v56 so a previous version of CB was already there.

Try downloading a 56 firefox, create a fresh profile, install an older CB then update firefox to 57 with that. But that probably won't work either for the beta without a hack since legacy addons are disabled and can't be used. I'm hoping someone comes up with a hack by v59 so we can use it with the esr version if the xul code is still there.

Re: [Signed fixed extension attached] CB broken on Firefox 4

PostPosted: Thu Oct 05, 2017 9:22 am
by morat
@Infocatcher

I got Custom Buttons, Attributes Inspector and DOM Inspector working with Fx Beta 57.

I had to hack the omni.ja file.

Thanks again.

Reference
http://dxr.mozilla.org/mozilla-beta/sou ... ttings.jsm

Re: [Signed fixed extension attached] CB broken on Firefox 4

PostPosted: Thu Oct 05, 2017 5:35 pm
by trapper john
@morat, I found that code in AddonSettings.jsm. What change to it did you make to enable addons in beta? I compared the code in 57 beta and 58 nightly and they're exactly the same.

Re: [Signed fixed extension attached] CB broken on Firefox 4

PostPosted: Thu Oct 05, 2017 10:12 pm
by morat
@trapper john

The AppConstants object is different in Fx Nightly 57 and Fx Beta 57.

Don't allow legacy extensions in beta/release builds post-57
http://bugzilla.mozilla.org/show_bug.cgi?id=1363897

Code: Select all
// Scratchpad Browser Environment in Fx Beta 57

// set devtools.chrome.enabled pref to true
// open about:addons in current tab

alert(content.AppConstants.MOZ_ADDON_SIGNING);           // true
alert(content.AppConstants.MOZ_REQUIRE_SIGNING);         // true
alert(content.AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS); // false

alert(content.AddonSettings.ADDON_SIGNING);           // true
alert(content.AddonSettings.REQUIRE_SIGNING);         // true  // false after hack
alert(content.AddonSettings.ALLOW_LEGACY_EXTENSIONS); // false // true  after hack

Reference
http://dxr.mozilla.org/mozilla-beta/source/toolkit/modules/AppConstants.jsm
http://dxr.mozilla.org/mozilla-beta/source/toolkit/mozapps/extensions/internal/AddonSettings.jsm

view-source:resource://gre/modules/AppConstants.jsm
view-source:resource://gre/modules/addons/AddonSettings.jsm

Fx Beta 57 isn't using brotli compression. (able to extract omni.ja with Info-Zip unzip.exe)

Command Prompt:

rem Usage: optimizejars.py --deoptimize "JAR_LOG_DIR" "IN_JAR_DIR" "OUT_JAR_DIR"
optimizejars.py --deoptimize "%TEMP%" "C:\FirefoxPortableTest\App\Firefox" "C:\."

cd /d C:\
unzip omni.ja modules/addons/AddonSettings.jsm
gvim modules/addons/AddonSettings.jsm

Code: Select all
- if (AppConstants.MOZ_REQUIRE_SIGNING && !Cu.isInAutomation) {
+ if (false && AppConstants.MOZ_REQUIRE_SIGNING && !Cu.isInAutomation) {

Code: Select all
- if (AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS || Cu.isInAutomation) {
+ if (true || AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS || Cu.isInAutomation) {

zip omni.ja modules/addons/AddonSettings.jsm

cd /d C:\FirefoxPortableTest\App\Firefox
ren omni.ja omni.ja.backup
copy C:\omni.ja

cd /d C:\FirefoxPortableTest
FirefoxPortable.exe -purgecaches

And remember to set the following preferences in the about:config page.

extensions.allow-non-mpc-extensions = true
extensions.legacy.enabled = true
xpinstall.signatures.required = false

Re: [Signed fixed extension attached] CB broken on Firefox 4

PostPosted: Thu Oct 05, 2017 10:55 pm
by trapper john
Thanks morat, there was nothing to it. Made the change and 57 beta booted up with custom buttons working like a charm. If it stays like this through v59 we should be able to do the same with 59esr.

For deoptimizing and optimizing I'm using python 2.7. There's an updated optimizejars.py that can be gotten here:

https://www.raymond.cc/blog/edit-files- ... -password/

Re: [Signed fixed extension attached] CB broken on Firefox 4

PostPosted: Fri Oct 06, 2017 12:39 am
by morat
@trapper john

We are screwed if the developers start using brotli compression again.

http://forums.mozillazine.org/viewtopic ... #p14764954
http://forums.mozillazine.org/viewtopic ... #p14765149

trapper john wrote:Thanks morat, there was nothing to it.

You're welcome.

Re: [Signed fixed extension attached] CB broken on Firefox 4

PostPosted: Fri Oct 06, 2017 10:26 am
by avada
Infocatcher wrote:Something for Firefox 57:
Signed: custom_buttons-0.0.5.8.9-fixed5-signed.xpi
Not signed: custom_buttons-0.0.5.8.9-fixed5.xpi

+ in about:config:
extensions.allow-non-mpc-extensions = true
extensions.legacy.enabled = true

Many thanks to Dumby.


Thanks a lot!

It works fine on FF56 also.

Re: [Signed fixed extension attached] CB broken on Firefox 4

PostPosted: Tue Oct 17, 2017 8:54 am
by Infocatcher
[x] Fixed external editor.
[x] Workaround for double initialization in SeaMonkey (extensions.custombuttons.preventDoubleInitialization preference).

Signed: custom_buttons-0.0.5.8.9-fixed6-signed.xpi
Not signed: custom_buttons-0.0.5.8.9-fixed6.xpi