If you just want to install the addon you can do that here. As the name implies it adds an entry to the context menu to search Wikipedia for highlighted text. The code can be found below. background.js

    id: "log-selection",
    title: "Search Wikipedia",
    contexts: ["selection"]

browser.contextMenus.onClicked.addListener(function(info, tab) {
    if (info.menuItemId == "log-selection") {
        var selectedText = info.selectionText;
                "language": "en",
                "tabBehaviour": "new",
                "tabActive": "yes"
            function(item) {
                var language = item.language;
                var tabBehaviour = item.tabBehaviour;
                var tabActive = item.tabActive;

                var url = "https://" + language + ".wikipedia.org/w/index.php?search=" + encodeURIComponent(selectedText) + "&title=Special%3ASearch&fulltext=Search";
                if (tabBehaviour == "new") {
                    if (tabActive == "no") {
                            url: url,
                            active: false
                    } else {
                            url: url
                } else {
                        url: url



document.addEventListener('DOMContentLoaded', loadOptions);
document.querySelector('form').addEventListener('submit', saveOptions);

var storage = chrome.storage.local;
var language = document.querySelector('#language');
var tabBehaviour = document.querySelector('#tabBehaviour');
var tabActive = document.querySelector('#tabActive');

function saveOptions(e) {
        'language': language.value,
        'tabBehaviour': tabBehaviour.value,
	'tabActive': tabActive.value
    }), function () {}

function loadOptions() {
        'language': 'en',
        'tabBehaviour': 'new',
	'tabActive': 'yes'
    }, function (items) {
        language.value = items.language;
        tabBehaviour.value = items.tabBehaviour;
	tabActive.value = items.tabActive;


<!DOCTYPE html>

    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="options.css">

        <select id="language" size="5">
			<option value="simple">Simple English</option>
			<option value="ar">العربية</option>
			<option value="id">Bahasa Indonesia</option>
			<option value="ms">Bahasa Melayu</option>
			<option value="bs">Bosanski</option>
			<option value="bg">Български</option>
			<option value="ca">Català</option>
			<option value="cs">Čeština</option>
			<option value="da">Dansk</option>
			<option value="de">Deutsch</option> 
			<option value="et">Eesti</option> 
			<option value="el">Ελληνικά</option> 
			<option value="en">English</option> 
			<option value="es">Español</option> 
			<option value="eo">Esperanto</option> 
			<option value="eu">Euskara</option>
			<option value="fr">Français</option>
			<option value="fa">فارسی</option> 
			<option value="gl">Galego</option> 
			<option value="ko">한국어</option> 
			<option value="he">Hrvatski</option> 
			<option value="it">Italiano</option> 
			<option value="ka">ქართული</option> 
			<option value="lv">Latviešu</option> 
			<option value="lt">Lietuvių</option> 
			<option value="hu">Magyar</option> 
			<option value="nl">Nederlands</option> 
			<option value="ja">日本語</option> 
			<option value="no">Norsk bokmål</option>
			<option value="nn">Norsk nynorsk</option> 
			<option value="pt">Português</option> 
			<option value="ro">Română</option> 
			<option value="ru">Русский</option> 
			<option value="sk">Slovenčina</option> 
			<option value="sl">Српски / srpski</option> 
			<option value="sh">Srpskohrvatski / српскохрватски</option> 
			<option value="fi">Suomi</option> 
			<option value="sv">Svenska</option> 
			<option value="th">ไทย</option>
			<option value="vi">Tiếng Việt</option> 
			<option value="uk">Українська</option> 
			<option value="zh">中文</option> 
            <h3>Tab behaviour</h3>
        <select id="tabBehaviour" size="2">
			<option value="new">Open in new tab</option>
			<option value="old">Open in active tab</option>
        <select id="tabActive" size="2">
			<option value="yes">New tab becomes active</option>
			<option value="no">New tab becomes not active</option>
        <p><button type="submit" class="button">Save</button></p>
    <script src="options.js"></script>



.button {
    border-style: hidden;
    background-color: rgb(76, 175, 80);
    padding: 0.5em 3em;
    color: white;

.button:hover {
    box-shadow: 0px 0px 20px #aaa;



    "description": "Select text. Right click. Search Wikipedia for the selected text.",
    "manifest_version": 2,
    "name": "Wikipedia Context Menu Search",
    "version": "1.2",
    "homepage_url": "https://diedrich.me/contact/",
    "icons": {
        "64": "icons/page-64.png"


    "applications": {
        "gecko": {
            "id": "@wikipediacontextmenusearch",
            "strict_min_version": "52.0"

    "background": {
        "scripts": ["background.js"]

    "options_ui": {
        "page": "options.html"

    "permissions": [

⤧  Next post Let Ubuntu send you Emails if security updates are available ⤧  Previous post Star time lapse