chrome.contextMenus.create(
    {
        "title": "Define \"%s\"",
        "contexts":["selection"],
        "onclick": function(info, tab){
            chrome.tabs.create(
                {url: "http://www.google.com/search?q=define" + encodeURIComponent(" " + info.selectionText).replace(/%20/g, "+")
            });
        }
});

chrome.contextMenus.create(
    {
        "title": "Define \"%s\"",
        "contexts":["selection"],
        "onclick": function(info, tab){
            chrome.tabs.create(
                {url: "http://www.google.com/search?q=define" + encodeURIComponent(" " + info.selectionText).replace(/%20/g, "+"),
                index: tab.index + 1,
                openerTabId: tab.id
            });
        }
});

Make the tab open directly to the right of the tab the lookup was started from, instead of at the end of all the window's tabs. Also, make the created tab have set an opener tab for it (affecting what tab gets focus when you close a tab).
Make the tab open directly to the right of the tab the lookup was started from, instead of at the end of all the window's tabs. Also, make the created tab have set an opener tab for it (affecting what tab gets focus when you close a tab).
