Are you looking to create a Chrome browser extension with a context menu that has different actions for left and right clicks? It's possible in Firefox, but how can it be done in Chrome?
https://i.sstatic.net/qrwq3.png
Here is an example implementation in background.js:
chrome.runtime.onInstalled.addListener(function() {
chrome.contextMenus.create({
title: 'do action (left cl. - first, right cl. - second)',
id: 'test',
contexts: ['link'],
});
});
chrome.contextMenus.onClicked.addListener(function(info, tab) {
if (info.menuItemId === "test") {
console.log("first action completed")
}
});