I am currently getting all of my data in the content script and storing it locally.
function getdata() {
setTimeout(function () {
chrome.storage.local.get(
[
"storedvideoid",
"storedvideotitle",
"storedchannelname",
"storedthumbnail",
"storeddate",
"storedviews",
],
function (result) {
chrome.runtime.sendMessage({});
alert(
"Watching " +
result.storedvideotitle +
" from " +
result.storedchannelname +
" uploaded on " +
result.storeddate +
" with " +
result.storedviews +
"views at " +
date.toLocaleString("en-US", timeoptions)
);
}
);
}, 600);
}
I want to get it to my popup.js so it can be displayed on my popup.
var title =
var channel =
var views =
var date =
document.getElementById("videoname").innerHTML = title;
document.getElementById("channelname").innerHTML = channel;
document.getElementById("views").innerHTML = views + " views";
document.getElementById("date").innerHTML = date;
I just want the strings I have saved to the local storage to be displayed on my popup.