ufal / korektor

Statistical spell- and (occasional) grammar-checker.
lindat.mff.cuni.cz/services/korektor
BSD 2-Clause "Simplified" License
17 stars 4 forks source link

Ensure at most one code execution per loaded tab #29

Closed MikkCZ closed 7 years ago

MikkCZ commented 7 years ago

This should ensure the code is injected only once per loaded tab. If the tab is reloaded or changes state in any way, the code needs to be injected again. I have tried to use named function as a listener first, but it did not solved the issue.

@foxik r?

foxik commented 7 years ago

I was worried that it would not work reliably, but after testing on both Chrome and Firefox, it seems to be working fine. Thanks!

MikkCZ commented 7 years ago

When I have time, I would like to improve the UI and port this to Firefox for Android too. It will be necessary to make changes to the content script and when I get familiar with it, I would like to avoid this completely by moving as much as possible to background and keep only UI related stuff in the content script.

foxik commented 7 years ago

BTW, I bumped the version of the addon to 1.1 and submitted to both Chrome and Firefox. Unfortunately, I did not have time to update the description and screen shots.