
Código:
manifest.json
{
"name": "Glitch me",
"description": "Glitch a imagen",
"version": "0.1",
"permissions": ["contextMenus", "tabs"],
"background": {
"scripts": ["glitch.js"]
},
"manifest_version": 2
}
glitch.js
var glitchMe = function(info) {
window.open("http://glitch.com.nu/?url=" + encodeURIComponent(info.srcUrl));
};
var title = "Glitch me!";
var id = chrome.contextMenus.create({"title": title, "contexts":["image"],"onclick": glitchMe});