Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Update Omnibox extension tutorial #324

Open
pepelsbey opened this issue Aug 6, 2015 · 0 comments
Open

Update Omnibox extension tutorial #324

pepelsbey opened this issue Aug 6, 2015 · 0 comments
Assignees

Comments

@pepelsbey
Copy link
Contributor

Reminder task. Since we won’t have URLs like this soon: dev.opera.com/extension-docs/search.html is would be good to update article and extension with something more universal. But not right now, only once new extensions docs are merged to master and deployed.

chrome.omnibox.onInputEntered.addListener(
    function(text) {
        var qString = 'http://dev.opera.com/extension-docs/search.html?q=' + encodeURIComponent(text);
        chrome.tabs.query({
            'currentWindow': true,
            'active': true
        }, function(tab) {
            chrome.tabs.update(
                tab[0].id, { 'url': qString }
            );
        });
    }
);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants