Youssef Sakuragi Youssef Sakuragi - 5 months ago 11
jQuery Question

How Do I only reload one image

I have a problem with images. I only want to reload 1 image when I click on the context menu.

chrome.contextMenus.create({

title: "Does it work?",
contexts:["image"],
onclick: clickOrigin,

});


When i click on the context menu
ClickOrigin
will be executed. But what code do I need so that
ClickOrigin
will reload only the picture i have right clicked on?

Answer

It seems you're going to be using chrome.contextMenus.update(integer or string id, object updateProperties, function callback) as mentioned in the Google contextMenus guide. It updates a previously created context menu item. Looking at the parameters that it accepts on onClick, it seems to accept, images, videos, and audio.