There is a webpage that constantly (every 100oms) log out a variable called "t", which is a json type. My goal is get the content of t variable in content.js (or some other injection method), pass it to background.js or popup.js and show up popup.html. it needs to run at same pace, like 1000ms as the t variable refresh every 1 second.
I am stucked at first step, i don't know how to get the variable in the main page. i do found some post have similar topic like this one: Access global js variables from js injected by a chrome extension, but i need more detailed implementation.