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

Fix notes from AMO review #42

Closed
ameshkov opened this issue Oct 30, 2015 · 1 comment
Closed

Fix notes from AMO review #42

ameshkov opened this issue Oct 30, 2015 · 1 comment
Assignees

Comments

@ameshkov
Copy link
Member

1) in preload.js you use:
setTimeout(function () {
   this.tryLoadCssAndScripts.bind(this);
}, 100);
which will not work. Aside from the this object being different in the inner function, you are not actually calling the bound function. This will work instead if you are ok with an ES6 version, otherwise I'm sure you'll know what to change.
setTimeout(() => this.tryLoadCssAndScripts(), 100);
You can also just use setTimeout(this.tryLoadCssAndScripts.bind(this), 100); the validator warning that shows up for that will usuall be ignored by reviewers, since they see that you are actually passing a function.

2) In resources/adguard-adblocker/lib/main.js, shouldn't that last line be __proto__ instead of __proto ? I guess this can also be cleaned up using Object.create(null) as mentioned previously.

3) I'm a little worried about the applyScripts method. I read you are injecting remote scripts only for non-Firefox, but I have to rummage through multiple levels of function calls to figure out if that is really the case. If you could add another check for isFirefoxBrowser closer to the applyScripts method, that would be super.
@ameshkov
Copy link
Member Author

For now I'll disable ALL script rules except hard-coded in Firefox add-on.

Mizzick pushed a commit that referenced this issue Jan 18, 2018
…o master

* commit 'f95e5f3b0ed9554316eb915dbd490631c406a860':
  ADG-557
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant