Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Opera search from the location bar

  • Loading branch information...
commit 556324351cb7dd1d3e8e283cac1b851339c195fd 1 parent 3307b46
@mrshu mrshu authored
Showing with 6 additions and 6 deletions.
  1. +1 −1  Makefile
  2. +5 −5 js/background.js
View
2  Makefile
@@ -1,7 +1,7 @@
EXTNAME := opera-zeroclick
KEYFILE := $(EXTNAME).pem
SHELL := /usr/bin/env bash
-CHROME := chromium -n --args
+CHROME := opera-developer -n --args
CWD := $(shell pwd)
TMPDIR := $(shell mktemp -d)
VERSION := $(shell python2 -c "import json,sys;print json.loads(sys.stdin.read()).get('version','')" < manifest.json)
View
10 js/background.js
@@ -94,8 +94,8 @@ Background.prototype.query = function(query, callback)
var background = new Background();
-// chrome.omnibox.onInputEntered.addListener( function(text) {
-// chrome.tabs.getSelected( undefined, function(tab) {
-// chrome.tabs.update(tab.id, {url: tab.url = "https://duckduckgo.com/?q="+encodeURIComponent(text)}, undefined);
-// });
-// });
+chrome.omnibox.onInputEntered.addListener( function(text) {
+ chrome.tabs.query({'currentWindow': true, 'active': true}, function(tabs) {
+ chrome.tabs.update(tabs[0].id, {url: "https://duckduckgo.com/?q="+encodeURIComponent(text)});
+ });
+});
Please sign in to comment.
Something went wrong with that request. Please try again.