I am creating a chrome extension that will interact with twitch drops and notify me if the drop is ready for collection. I am injecting a content script fetch attributes of a particular element by its class but it shows Cannot read properties of null (reading 'getAttribute'). Here is my content.js code:
var element = document.querySelector(".juerA");
var val = element.getAttribute('value');
console.log(val);
If I run the same code on the console, it works fine. I have tried using "run_at" : "document_end" but it doesn't work. I have also checked if the extension works if I change the matches of the content script with other web pages and it works.