@EmanueleGurini
Posted
Hi @mattyoung7, well done, but reload doesn't works on FireFox: seem that FF caching the fetch result.
I found this solution on StackOverflow (https://stackoverflow.com/questions/72567690/ui-is-not-updating-on-click-event-that-triggers-a-fetch-on-firefox-developer) but the problem is that property called count is always incremented by one, and, if you start a new session, advice is always the same in a row.
To avoid the same advice in a row, as you can see from my solution, I create a new Random number, and I use it only if my script detects firefox browser.
My solution: https://github.com/EmanueleGurini/js-advicegenerator/blob/master/js/main.js
ps. why am I using 224 as max number? Advices are 224.