openfoodfacts / power-user-script

User script for your browser, to empower Open Food Facts contribution
GNU Affero General Public License v3.0
12 stars 5 forks source link

PUS icons in list view disappear if the products are ranked by personal criterion #91

Open teolemon opened 5 months ago

teolemon commented 5 months ago

What

image image

DanieliusAsm commented 2 months ago

I guess a listener is needed once the switch is pressed. But not only that, you also need to listen to any changes made in "Edit your food preferences" section as the icons will disappear too.

Since any change made there redraws all the products in the list, therefore the buttons disappear.

DanieliusAsm commented 2 months ago

93 will somewhat fix this. Only the switch part and not the food preferences.

That switch appears on the page like 3 seconds later after onLoad gets called... So I used a Timeout callback which gets called after 5secs. Which is a hacky solution and might not work for users that have slower internet speed.