Nebih Nebihi
New Member
Hello everyone, I hope someone can help me out with this.
I have build a local website, for a animated loading screen for my twitch account.
I inject the local HTML file (with local html, css and javascript files) via the Browser Source, and I get a NaN issue, if I try to get access to a localstorage value in the browser.
My code works perfectly fine in all browsers, If I set the value hard coded into the script, it works. But I implemented a little local backend, where I get the value from the localstorage.
Here the hardcoded value: (5 minutes)
progress(500, 500, $('#progressBar')); (500 is the value of the timeleft and timetotal)
If I replace the hard value with my localstorage value, I get following error:
var streamValue = localStorage.getItem('streamValue');
progress(streamValue, streamValue, $('#progressBar'));
In all browsers this works perfectly fine. How does the browser source work?
I hope someone can help me out.
Kind regards,
Neb
I have build a local website, for a animated loading screen for my twitch account.
I inject the local HTML file (with local html, css and javascript files) via the Browser Source, and I get a NaN issue, if I try to get access to a localstorage value in the browser.
My code works perfectly fine in all browsers, If I set the value hard coded into the script, it works. But I implemented a little local backend, where I get the value from the localstorage.
Here the hardcoded value: (5 minutes)
progress(500, 500, $('#progressBar')); (500 is the value of the timeleft and timetotal)
If I replace the hard value with my localstorage value, I get following error:
var streamValue = localStorage.getItem('streamValue');
progress(streamValue, streamValue, $('#progressBar'));
In all browsers this works perfectly fine. How does the browser source work?
I hope someone can help me out.
Kind regards,
Neb