I am trying to add the title of the current tab which is being loaded in the browser to my web extension which is locally hosted on my PC. I've attached an external script.js
file with my extension which contains the following code:
window.onload = function domainSetter(){
document.getElementById('domainTitle').innerHTML = window.location.host;
}
So, if I'm on Facebook and click on my extension. It should get me Facebook but it gives me this:
eeglgckcnbjkfanidkckmlmkfjdpkejg
how can I possibly fix this?