--- /dev/null
+browser.menus.create({
+ id: "cliktionary",
+ title: "Cliktionary",
+ contexts: ["selection"]
+});
+
+browser.menus.onClicked.addListener((info, tab) => {
+ switch (info.menuItemId) {
+ case "cliktionary":
+ browser.tabs.create({url: `https://en.wiktionary.org/wiki/${info.selectionText}`});
+ break;
+ }
+});
--- /dev/null
+{
+ "manifest_version": 2,
+ "name": "Cliktionary",
+ "version": "0.1",
+
+ "description": "Search Wiktionary for any text you right click.",
+
+ "permissions": [
+ "menus",
+ "tabs"
+ ],
+
+ "background": {
+ "scripts": ["background.js"]
+ }
+}