jelmervdl / translatelocally-web-ext

TranslateLocally for the Browser is a web-extension that enables client side in-page translations for web browsers.
https://addons.mozilla.org/en-GB/firefox/addon/translatelocally-for-firefox/
Mozilla Public License 2.0
65 stars 3 forks source link

Restore page after InPageTranslation #34

Closed jelmervdl closed 2 years ago

jelmervdl commented 2 years ago

General steps of the process:

jelmervdl commented 2 years ago

Performance looks okay-ish now. I'm mainly testing on Booking.com. Especially the Google maps overview when finding hotels seems to be intense, but it can cope.

I would love some form of automated performance testing at this point, but I don't know how that would work.

Edit: one more thing that would be "nice to have" is reverting to the original page when the translation add-on is disabled or uninstalled. But a quick search didn't yield any events that I could listen for from inside the add-on.

jelmervdl commented 2 years ago

I've created a bug report about WeakRef not working which causes this code to use way too much memory when a page is open for a longer time. I hope that there is a fix for that.

If not, I'm tempted to add the functionality anyway and just pressure Mozilla in fixing it muhahaha. Undoing translation has been pretty much the most requested feature…