Hi,
I develop Firefox Add-Ons(extension) tool, selected text > right click > search on twitter
Add-Ons Link: https://addons.mozilla.org/tr/firefox/addon/search-onn-twitter/
Github link: https://github.com/semihcelikol/searchOnTwitter
Manifest.json
{
"manifest_version": 2,
"name":"Search on Twitter",
"description": "Selected text Search on Twitter",
"version": "1.0",
"author": "Semih Çelikol",
"homepage_url": "http://semihcelikol.com",
"icons": {
"48": "icons/icon48.png",
"64": "icons/icon64.png",
"96": "icons/icon96.png"
},
"permissions": ["contextMenus"],
"background": {
"scripts": [
"background.js"
]
}
}
background.js
browser.contextMenus.create({
id: "tts",
title: "Search on Twitter",
contexts: ["selection"]
});
browser.contextMenus.onClicked.addListener(contextMenuAction);
function contextMenuAction(info, tab){
const url = "https://twitter.com/search?q="+ info.selectionText+ "&src=typed_query";
browser.tabs.create({url:url});
}
Top comments (0)