With the addon you can search for highlighted text on Wikipedia via the context menu. It got settings for the version of Wikipedia you want to search and tab behaviour. You can install it here https://addons.mozilla.org/en-US/firefox/addon/wikipedia-context-menu-search/ or take a look at the source code here https://github.com/2341/wikipedia-context-menu-search.