Skip to content
This repository has been archived by the owner on Oct 11, 2018. It is now read-only.

Commit

Permalink
Issue jbolster#7 - Fixed it so multiple context menus aren't added (a…
Browse files Browse the repository at this point in the history
…lways removeAll() before setting).
  • Loading branch information
jbolster committed Feb 25, 2011
1 parent 3e4848d commit 6303542
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Extension/Html/background.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
});

function enableContextMenu(enable){
chrome.contextMenus.removeAll();

if(enable){
chrome.contextMenus.create({
"title": "Stack Fiddle",
Expand All @@ -38,8 +40,6 @@
"onclick" : function(info,tab){
chrome.tabs.create({ url:"/Html/options.html", index: (tab.index + 1) });
}});
}else{
chrome.contextMenus.removeAll();
}
}

Expand Down

0 comments on commit 6303542

Please sign in to comment.