{
"name": "Uygulama",
"version": "1.0",
"description": "Hello world",
"manifest_version": 2,
"permissions": [
"activeTab"
],
"background": {
"scripts": ["popup.js"]
},
"browser_action": {
"default_title": "Say hello world",
"default_popup": "popup.html"
}
}<!DOCTYPE html>
<html>
<head>
<title>Merhaba dünya!!!</title>
<script src="popup.js"></script>
</head>
<body>
<button id="helloBtn">Write Hello World to console</button>
</body>
</html>
window.onload = function () {
var button = document.getElementById('helloBtn');
button.addEventListener('click', function() {
chrome.tabs.executeScript({
code: 'console.log("Hello World!");'
});
});
};
Eklenti oluşturuluyor ancak Console kısmında hiç bir hareket olmuyor ne yazık ki.