Skip to content

Commit

Permalink
allow context menu for links and video only
Browse files Browse the repository at this point in the history
  • Loading branch information
grmat committed May 22, 2018
1 parent 80c88ab commit de7d85d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
function invoke(info, tab) {
var url = tab.url;
if (info) {
url = info.linkUrl;
url = info.linkUrl || info.srcUrl;
}
console.log("play-with attempting to play url " + url);
browser.tabs.sendMessage(tab.id, {url: url});
Expand All @@ -17,7 +17,7 @@ function invoke(info, tab) {
browser.contextMenus.create({
id: "play-with",
title: browser.i18n.getMessage("actionName"),
contexts: ["all"]
contexts: ["link", "video"]
});

/*
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "Play media on current URL in external application.",
"manifest_version": 2,
"name": "play-with",
"version": "1.3",
"version": "1.3.1",
"default_locale": "en",

"background": {
Expand Down

0 comments on commit de7d85d

Please sign in to comment.