I want to migrate an extension to the new manifest vesion but I am unable to convert the following files from manifest v2 to manifest v3
manifest.json
{
"manifest_version": 2,
"name": "Notetaking",
"description": "Plugin to take notes in your browser.",
"version": "1.0.0",
"icons": {
"16": "icons/16x16.png",
"48": "icons/48x48.png",
"128": "icons/128x128.png"
},
"background": {
"scripts": [
"background.js"
] },
"browser_action": {
"default_icon": {
"48": "icons/48x48.png",
"128": "icons/128x128.png"
},
"default_title": "Notetaking",
"default_popup": "popup.html"
},
"permissions": ["storage"]
}
backgroun.js
//We are listening for someone who connects herepopup.js
//We connect to background.js, that's listenning for new connections, so that the knows when we close the popup
var port = chrome.extension.connect({name: "SNT"});
//When we're ready... :)
$(document).ready( function() {
//We try to retrieve the information stored
chrome.storage.local.get('SNT', function(items) {
//We insert the information we've received, even if there's none
$("#SNT").text(items.SNT);
});
//Every time we press a key, we save the information to storage
$("#SNT").bind('keyup', function() {
chrome.storage.local.set({ 'SNT': $(this).val() }, function(){});
});
});
If you can help me please, i will be really grateful.