Changing Elements Brightness Based on Completion Percentage Across Multiple HTML Pages

Question:
In my project, when game.completeionPercetage >= 75, I want stoneageImg to change its brightness form 0% to 100%, but because there on different html pages with different js files, i’m not sure how to do it

Repl link:
https://replit.com/@JohnnySuriano/Cycle-Clicker#script.js

1 Like

Kinda just guessing bc I’ve not done much JS but is there such a thing as a sort of variable which is cross files so you could like set the variable to the completion percentage and compare that to the value you want and then execute the brightness based on the result?

That’s called a cookie. Basically you can store info across pages (such as login tokens and stuff)

1 Like

You just need to pass that value between pages, you can use URL parameters to get that.