Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants