Skip to content
This repository was archived by the owner on Oct 3, 2025. It is now read-only.

Less global variables to reduce name clashing with other add-ons - #53

Merged
snipsnipsnip merged 2 commits into
exteditor:masterfrom
snipsnipsnip:less-globals
Dec 24, 2019
Merged

snipsnipsnip merged 2 commits into
exteditor:masterfrom
snipsnipsnip:less-globals

Conversation

@snipsnipsnip

@snipsnipsnip snipsnipsnip commented Dec 20, 2019 •

Copy link
Copy Markdown
Member

Some variable name used by External Editor are also used by other add-ons and causing problem.
In my case, nsPreferences was clashing with https://github.com/Meatian/confirm-address/.
Wrap in a module-like object to reduce chance of name clashing.

I tried to use modern nice way of namespacing (like import, require, ChromeUtils.import), but all of them required some effort to migrate. It's likely that I need to do major refactoring as part of Web Extension Experiments conversion for Thunderbird 78 either way, so I kept current plain old JS for now.

@snipsnipsnip
snipsnipsnip force-pushed the less-globals branch 3 times, most recently from 2018c4c to db7fad6 Compare December 22, 2019 14:51
Some variable name (`nsPreferences` in my case) used by External
Editor are also used by other add-ons and causing problems.
Wrap in a module-like thing to reduce chance of name clash.
@snipsnipsnip
snipsnipsnip merged commit 7b429e4 into exteditor:master Dec 24, 2019
@snipsnipsnip
snipsnipsnip deleted the less-globals branch December 24, 2019 14:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant