mirror of
https://github.com/ShareX/ShareX.git
synced 2024-08-18 19:51:39 +12:00
14 lines
No EOL
364 B
JavaScript
14 lines
No EOL
364 B
JavaScript
chrome.contextMenus.create({
|
|
"id": "ShareX",
|
|
"title": "Upload with ShareX",
|
|
"contexts": ["selection", "image", "video", "audio"]
|
|
});
|
|
|
|
chrome.contextMenus.onClicked.addListener(onClicked);
|
|
|
|
function onClicked(info, tab) {
|
|
chrome.runtime.sendNativeMessage("com.getsharex.sharex", {
|
|
URL: info.srcUrl,
|
|
Text: info.selectionText
|
|
});
|
|
} |