this is a very simple addon
manifest.json
{
"manifest_version": 2,
"name": "Borderify",
"version": "1.0",
"description": "Adds a red border to all webpages matching mozilla.org.",
"icons": {
"48": "icons/border-48.png"
},
"content_scripts": [
{
"matches": ["*://*.localhost/*"],
"js": ["app.js"]
}
]
}
app.js
document.body.style.backgroundColor = "red";
document.getElementById('foot').innerHTML = 'hi';
alert(1);
this works fine when i open localhost but when i change
"matches": ["*://*.localhost/*"],
to
"matches": ["*://*.stackoverflow/*"],
it wouldn’t work anymore when i open stackoverflow.com