We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c3de2e commit b321ac1Copy full SHA for b321ac1
extension/backgroundContextMenus.js
@@ -0,0 +1,16 @@
1
+
2
+'use strict';
3
4
+chrome.runtime.onInstalled.addListener(function() {
5
+ chrome.contextMenus.create({
6
+ id: "stack_overflow_search_context_id",
7
+ title: "Search in StackOverflow",
8
+ type: 'normal',
9
+ contexts: ['selection'],
10
+ });
11
+});
12
13
+chrome.contextMenus.onClicked.addListener(function(item, tab) {
14
+ let searchUrl = "https://www.stackoverflow.com/search?q="+item.selectionText;
15
+ chrome.tabs.create({url: searchUrl, index: tab.index + 1});
16
0 commit comments