drewrwilson / SomeRichAsshole

Browser add-on that replaces "Donald Trump" with "Some Rich Asshole"
http://SomeRichAsshole.com
MIT License
17 stars 9 forks source link

Notes from Mozilla's review of the add-on #33

Open drewrwilson opened 9 years ago

drewrwilson commented 9 years ago

As part of submitting it to the Mozilla add-on store, they do a review of the code. Here's what feedback they gave:

Your preliminary review request has been approved.

Please note the following for the next update: 1) If the addEventListener() (or JQuery .on) is used once (e.g. for 'load', 'DOMContentLoaded'), it is good practice to removeEventListener() (or JQuery .off) as soon as its function is called and free the resources. elem.addEventListener(event, myfunction, false); function myfunction() { elem.removeEventListener(event, myfunction, false); // remove listener, no longer needed // rest of the function code }

elem.addEventListener(event, function myfunction(event){ elem.removeEventListener(event, myfunction, false); // remove listener, no longer needed // rest of the function code },false);

2) Add-on contains duplicate/hidden/unused/unnecessary files or folders. These complicate the review process and may contain sensitive information about the system you created the XPI on. Please correct your packaging process so that these files aren't included.

__MACOSX ... and its content chrome/.DS_Store

Thank you.