I am trying to write a simple google chrome extension which can remove the stackoverflow logo from the stackoverflow.com website. But it doesn't work.
Here is my work.
manifest.json
{
"manifest_version": 2,
"name": "Transpose",
"description": "Extension to switch images",
"version": "1.0",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"permissions": [
"activeTab"
]
}
popup.html
<!doctype html>
<html>
<head>
<title>Transpose</title>
<script src="jquery-1.11.3.min.js"></script>
<script src="popup.js"></script>
</head>
<body>
<h1>Transpose</h1>
<button id="btnEnable">Enable Add-on</button>
</body>
</html>
popup.js
document.addEventListener('DOMContentLoaded', function () {
chrome.tabs.getCurrent(function (tab) {
//alert(tab.title);
$('#btnEnable').on('click', function () {
$('#hlogo').remove();
});
});
}, false);
Can anyone help me to figure out the error?