MrOtherGuy / fx-autoconfig

Load custom javascript in browser context
Mozilla Public License 2.0
164 stars 10 forks source link

Remove Services.jsm import #30

Closed aminomancer closed 12 months ago

aminomancer commented 12 months ago

I think this won't actually throw since globalThis.Services should always exist, but since the backup import no longer works, it seems better to remove it.

https://bugzilla.mozilla.org/show_bug.cgi?id=1780695

https://github.com/MrOtherGuy/fx-autoconfig/blob/b0312502f970e9a72184fe9b238d8e0feaca2e3d/profile/chrome/utils/boot.jsm#L6C17-L8C70

MrOtherGuy commented 12 months ago

Yup, the import will be removed in version "0.8" which will also change quite a bit of other stuff, since it will also convert boot.jsm to ESM, split utils into its own file and add a mechanism to load custom scripts as ES6 module scripts into window scopes (think scripts being .uc.mjs files).

aminomancer commented 12 months ago

Yup, the import will be removed in version "0.8" which will also change quite a bit of other stuff, since it will also convert boot.jsm to ESM, split utils into its own file and add a mechanism to load custom scripts as ES6 module scripts into window scopes (think scripts being .uc.mjs files).

Nice! Should have known you were on top of it 😅

MrOtherGuy commented 12 months ago

If you feel like testing your luck with version 0.8 it's now been pushed to master branch. I'm reasonably certain there aren't huge issues remaining, but I know you use this much more extensively than I do so if anybody can find issues it's gotta be you :)

aminomancer commented 12 months ago

Awesome, will definitely give it a try this weekend.