Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anonymize nightly and nightlyApp implementations to allow Components.* (Cc, Cu, ...) shortcuts be used #128

Closed
xabolcs opened this issue Apr 13, 2013 · 5 comments

Comments

@xabolcs
Copy link
Collaborator

xabolcs commented Apr 13, 2013

From pull #82 for issue #52:

whimboo wrote:

We have an inconsistency here how we use Cc and Ci regarding their short and long names. If you feel fine please make it shorter here.

xabolcs wrote:

I see no inconsistency here reagrding to Cx shortcuts.
Please note that nightly.js doesn't have those shortcuts!

My proposal is that to implement nightly and nightlyApp as anonymous functions,
and export the defined variable to window like below:

(function() {
  const {Cc: classes, Ci: interfaces, Cu: utils, Cm: manager} = Components;

  var nightly = {

    variables: {
      _appInfo: null,
      get appInfo() {...}
    },

  ...
  }

  window.nightly = nightly;
  window.addEventListener("load", nightly.init, false);
  window.addEventListener("unload", nightly.unload, false);

})();
@whimboo
Copy link
Contributor

whimboo commented Apr 15, 2013

Why would we need the anonymous function, and don't simply put the const line at the top of the file?

@xabolcs
Copy link
Collaborator Author

xabolcs commented Apr 15, 2013

... and don't simply put the const line at the top of the file?

To avoid global namespace pollution and other issues.

@whimboo
Copy link
Contributor

whimboo commented Apr 15, 2013

I would love to have a restartless extension and that we could make use of require(). :S

@xabolcs
Copy link
Collaborator Author

xabolcs commented Apr 15, 2013

I would love to have a restartless extension and that we could make use of require(). :S

I happily continue (and publish) my experiments with OverlayManager after we get all my currently open pulls merged:

  • screenshot upload
  • pastebin
  • titlebar customization for SeaMonkey
  • AppMenu overlay for Thunderbird
  • variables support for TabGroup
  • ...

@whimboo
Copy link
Contributor

whimboo commented Sep 13, 2017

This only worked for the old legacy extension.

@whimboo whimboo closed this as completed Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants