├── img
├── icon_128.png
├── icon_16.png
├── icon_19.png
├── icon_38.png
└── icon_48.png
├── README.md
├── html
├── background.html
├── options.html
└── popup.html
├── Makefile
├── css
├── bing.css
├── google.css
└── common.css
├── js
├── options.js
├── bing.js
├── background.js
├── google.js
├── popup.js
├── common.js
└── jquery.js
├── LICENSE
└── manifest.json
/img/icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/duckduckgo/opera-zeroclickinfo/HEAD/img/icon_128.png
--------------------------------------------------------------------------------
/img/icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/duckduckgo/opera-zeroclickinfo/HEAD/img/icon_16.png
--------------------------------------------------------------------------------
/img/icon_19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/duckduckgo/opera-zeroclickinfo/HEAD/img/icon_19.png
--------------------------------------------------------------------------------
/img/icon_38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/duckduckgo/opera-zeroclickinfo/HEAD/img/icon_38.png
--------------------------------------------------------------------------------
/img/icon_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/duckduckgo/opera-zeroclickinfo/HEAD/img/icon_48.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | opera-zeroclickinfo
2 | ===================
3 |
4 | **This repository has been deprecated. Our current extension (which is compatible with the latest Opera) can be found at: https://github.com/duckduckgo/duckduckgo-privacy-extension.**
5 |
6 | A DuckDuckGo extension for Opera
7 |
8 | More info at the [help page](http://help.dukgo.com/customer/portal/articles/216453-opera).
9 |
--------------------------------------------------------------------------------
/html/background.html:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
21 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | EXTNAME := opera-zeroclick
2 | KEYFILE := $(EXTNAME).pem
3 | SHELL := /usr/bin/env bash
4 | CHROME := opera-developer -n --args
5 | CWD := $(shell pwd)
6 | TMPDIR := $(shell mktemp -d)
7 | VERSION := $(shell python2 -c "import json,sys;print json.loads(sys.stdin.read()).get('version','')" < manifest.json)
8 | ITEMS := css/ html/ img/ js/ manifest.json
9 |
10 | all: pack
11 |
12 | movebuild:
13 | rm -rf $(TMPDIR)
14 | mkdir $(TMPDIR)
15 | cp -R $(ITEMS) $(TMPDIR)
16 |
17 | moveout: $(ITEMS)
18 | mkdir $(TMPDIR)/$(EXTNAME)
19 | cp -R $(ITEMS) $(TMPDIR)/$(EXTNAME)
20 |
21 | nex: moveout
22 | $(CHROME) --pack-extension=$(TMPDIR)/$(EXTNAME) \
23 | --pack-extension-key=$(KEYFILE) --no-message-box
24 | mv $(TMPDIR)/$(EXTNAME).nex $(CWD)/build/$(EXTNAME)-latest.nex
25 |
26 | zip: moveout
27 | cd $(TMPDIR)/$(EXTNAME)/ && zip $(EXTNAME)-$(VERSION).zip -r ./*
28 | cp $(TMPDIR)/$(EXTNAME)/$(EXTNAME)-$(VERSION).zip $(CWD)
29 |
30 | build: zip
31 | mv $(CWD)/$(EXTNAME)-$(VERSION).zip ~/dropbox/Dropbox/DuckDuckGo\ Assets/Extensions/Chrome/
32 |
33 | clean:
34 | rm $(CWD)/*.zip
35 |
--------------------------------------------------------------------------------
/html/options.html:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 | DuckDuckGo for Chrome - Options
20 |
21 |
22 |
23 |
24 | Answers on Google/Bing (on top of links)
25 |
26 |
27 | Show Answers in right panel on Google
28 |
29 |
30 | Remember last search in the popup
31 |
32 |
33 | Use POST requests where possible
34 |
35 |
36 | Show debug information:
37 |
38 |
39 | Safe Search:
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/css/bing.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 DuckDuckGo, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ddg_zeroclick.bing {
18 | width: 517px;
19 | /* margin-left: 20px;*/
20 | }
21 |
22 | .bing #ddg_zeroclick_answer {
23 | line-height: 2.2em;
24 | }
25 |
26 | /*
27 | .bing #ddg_zeroclick_official_links {
28 | padding: 5px 0px 5px 1px;
29 | }
30 |
31 | .bing #ddg_zeroclick_official_links img {
32 | margin-top: -1px;
33 | }
34 |
35 | .bing .ddg_zeroclick_category {
36 | background-position: 2px 2px;
37 | border: 1px solid #fafafa;
38 | }
39 |
40 | .bing .ddg_zeroclick_category {
41 | background-position: 2px 2px;
42 | padding: 0px 0px 0px 26px !important;
43 | }
44 |
45 | .bing .ddg_zeroclick_article {
46 | background-position: 2px 2px;
47 | padding: 0px 0px 0px 26px !important;
48 | }
49 |
50 | .bing .ddg_zeroclick_more {
51 | background-position: 2px 2px;
52 | padding: 0px 0px 0px 26px !important;
53 | cursor: pointer;
54 | }
55 |
56 | .bing .ddg_zeroclick_category_item {
57 | width: 470px;
58 | }
59 |
60 | .bing .disambig_more {
61 | width: 434px;
62 | }
63 |
64 | .bing .wrapper {
65 | width: 490px !important;
66 | }
67 |
68 | .bing .ddg_more_link {
69 | padding-left: 2px;
70 | }
71 | */
72 |
--------------------------------------------------------------------------------
/css/google.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 DuckDuckGo, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | .google #ddg_zeroclick{
18 | width: 554px;
19 | }
20 |
21 | .google #ddg_zeroclick_abstract > div{
22 | border: 1px solid #fafafa;
23 | padding-left: 2px;
24 | }
25 |
26 | .google .first_category {
27 | margin-top: 3px !important;
28 | }
29 |
30 | /*
31 | .google #ddg_zeroclick_official_links {
32 | padding: 5px 0px 5px 0px;
33 | }
34 |
35 | .google #ddg_zeroclick_official_links img {
36 | margin-top: -2px;
37 | }
38 | */
39 |
40 | .google .ddg_zeroclick_category {
41 | background-position: 2px 4px;
42 | padding: 1px 0px 1px 36px !important;
43 | }
44 |
45 | .google .ddg_zeroclick_article {
46 | background-position: 2px 4px;
47 | padding: 1px 0px 1px 36px !important;
48 | }
49 |
50 | .google .ddg_zeroclick_more {
51 | background-position: 2px 4px;
52 | padding: 1px 0px 1px 36px !important;
53 | }
54 |
55 | .google .ddg_zeroclick_category_item {
56 | width: 430px !important;
57 | }
58 |
59 | .google .disambig_more {
60 | width: 474px;
61 | }
62 |
63 | .google .wrapper {
64 | width: 530px;
65 | }
66 | /*
67 | .google .ddg_more_link {
68 | padding-left: 12px;
69 | }
70 | */
71 |
72 | .google .disambig_more a {
73 | cursor: pointer;
74 | }
75 |
76 |
--------------------------------------------------------------------------------
/js/options.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012, 2014 DuckDuckGo, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | // Saves options to localStorage.
18 | function save_options() {
19 | var dev = document.getElementById("dev").checked;
20 | localStorage["dev"] = dev;
21 | var zeroclickinfo = document.getElementById("zeroclickinfo").checked;
22 | localStorage["zeroclickinfo"] = zeroclickinfo;
23 | var lastsearch_enabled = document.getElementById("lastsearch_enabled").checked;
24 | localStorage["lastsearch_enabled"] = lastsearch_enabled;
25 | var zeroclick_google_right = document.getElementById("zeroclick_google_right").checked;
26 | localStorage["zeroclick_google_right"] = zeroclick_google_right;
27 |
28 | // setting this to false should also reset the last search.
29 | if (!lastsearch_enabled)
30 | localStorage["last_search"] = '';
31 |
32 |
33 | if (dev)
34 | console.log(localStorage);
35 |
36 | // Update status to let user know options were saved.
37 | var status = document.getElementById("status");
38 | status.innerHTML = "Options Saved.";
39 | setTimeout(function() {
40 | status.innerHTML = "";
41 | }, 750);
42 |
43 | chrome.extension.sendMessage({'options': localStorage}, function(response){
44 | console.log(response);
45 | });
46 | }
47 |
48 | // Restores select box state to saved value from localStorage.
49 | function restore_options() {
50 | var dev = localStorage["dev"];
51 | if (dev === 'true') {
52 | document.getElementById("dev").checked = true;
53 | } else {
54 | document.getElementById("dev").checked = false;
55 | }
56 |
57 | var zeroclickinfo = localStorage["zeroclickinfo"];
58 | if (zeroclickinfo === 'true' || zeroclickinfo == undefined) {
59 | document.getElementById("zeroclickinfo").checked = true;
60 | } else {
61 | document.getElementById("zeroclickinfo").checked = false;
62 | }
63 |
64 | var lastsearch_enabled = localStorage["lastsearch_enabled"];
65 | if (lastsearch_enabled === 'true' || lastsearch_enabled == undefined) {
66 | document.getElementById("lastsearch_enabled").checked = true;
67 | } else {
68 | document.getElementById("lastsearch_enabled").checked = false;
69 | }
70 |
71 | var zeroclick_google_right = localStorage["zeroclick_google_right"];
72 | if (zeroclick_google_right === 'true') {
73 | document.getElementById("zeroclick_google_right").checked = true;
74 | } else {
75 | document.getElementById("zeroclick_google_right").checked = false;
76 | }
77 |
78 |
79 | }
80 |
81 | document.addEventListener('DOMContentLoaded', function(){
82 | restore_options();
83 | })
84 |
85 | document.addEventListener('click', function(){
86 | save_options();
87 | })
88 |
--------------------------------------------------------------------------------
/js/bing.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 DuckDuckGo, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | var options = {};
18 | var ddgBox;
19 | chrome.extension.sendMessage({options: "get"}, function(opt){
20 | for (var option in opt) {
21 | options[option] = (opt[option] === 'true') ? true : false;
22 | }
23 |
24 | if (document.getElementById('b_results') !== null) {
25 | var results_div = 'b_results';
26 | } else {
27 | var results_div = 'results_container';
28 | }
29 |
30 | ddgBox = new DuckDuckBox({
31 | inputName: 'q',
32 | hover: false,
33 | contentDiv: results_div,
34 | className: 'bing'
35 | });
36 |
37 | ddgBox.search = function(query) {
38 | var request = {query: query};
39 | chrome.extension.sendMessage(request, function(response){
40 | if (response === null) return false;
41 |
42 | // ditch the InstantAnswer Box if there is a Bing Calc one
43 | if (document.getElementById('rcCalB') !== null) {
44 | return true;
45 | }
46 |
47 | ddgBox.renderZeroClick(response, query);
48 | return true;
49 | });
50 |
51 | if (options.dev)
52 | console.log("query:", query);
53 | }
54 |
55 | ddgBox.init();
56 |
57 | });
58 |
59 | var ddg_timer;
60 |
61 | function getQuery(direct) {
62 | var instant = document.getElementsByClassName("gssb_a");
63 | if (instant.length !== 0 && !direct){
64 | var selected_instant = instant[0];
65 |
66 | var query = selected_instant.childNodes[0].childNodes[0].childNodes[0].
67 | childNodes[0].childNodes[0].childNodes[0].innerHTML;
68 | query = query.replace(/<\/?(?!\!)[^>]*>/gi, '');
69 |
70 | if(options.dev)
71 | console.log(query);
72 |
73 | return query;
74 | } else {
75 | return document.getElementsByName('q')[0].value;
76 | }
77 | }
78 |
79 | function qsearch(direct) {
80 | var query = getQuery(direct);
81 | ddgBox.lastQuery = query;
82 | ddgBox.search(query);
83 | }
84 |
85 | // instant search
86 |
87 | $('[name="q"]').keyup(function(e){
88 | var query = getQuery();
89 | if(ddgBox.lastQuery !== query && query !== '')
90 | ddgBox.hideZeroClick();
91 |
92 | if(options.dev)
93 | console.log(e.keyCode);
94 |
95 | var direct = false;
96 | if(e.keyCode == 40 || e.keyCode == 38)
97 | direct = true;
98 |
99 | clearTimeout(ddg_timer);
100 | ddg_timer = setTimeout(function(){
101 | qsearch(direct);
102 | }, 700);
103 |
104 | });
105 |
106 | $('[name="go"]').click(function(){
107 | qsearch();
108 | });
109 |
110 |
--------------------------------------------------------------------------------
/js/background.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012, 2016 DuckDuckGo, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 |
18 | function Background() {
19 | $this = this;
20 |
21 | // clearing last search on borwser startup
22 | localStorage['last_search'] = '';
23 |
24 | var os = "o";
25 | if (window.navigator.userAgent.indexOf("Windows") != -1) os = "w";
26 | if (window.navigator.userAgent.indexOf("Mac") != -1) os = "m";
27 | if (window.navigator.userAgent.indexOf("Linux") != -1) os = "l";
28 |
29 | localStorage['os'] = os;
30 |
31 | /*
32 | * Make sure previous versions of the extensions defaults to showing
33 | * Answers on Google/Bing
34 | */
35 | if (localStorage['prev_version'] === undefined) {
36 | localStorage['zeroclickinfo'] = 'false';
37 | } else {
38 | if (localStorage['zeroclickinfo'] === undefined) {
39 | localStorage['zeroclickinfo'] = 'true';
40 | }
41 | }
42 |
43 | chrome.extension.onMessage.addListener(function(request, sender, callback) {
44 | if (request.query)
45 | return $this.query(request.query, callback);
46 | if (request.options) {
47 | callback(localStorage);
48 | }
49 |
50 | if (request.current_url) {
51 | chrome.tabs.getSelected(function(tab) {
52 | console.log(tab);
53 | var url = tab.url;
54 | callback(url);
55 | });
56 | }
57 |
58 | return true;
59 | });
60 | }
61 |
62 | Background.prototype.query = function(query, callback) {
63 | console.log('got a query', query);
64 | var req = new XMLHttpRequest();
65 | if (localStorage['zeroclickinfo'] === 'false') {
66 | callback(null);
67 | return;
68 | } else {
69 | req.open('GET', 'https://api.duckduckgo.com?q=' + encodeURIComponent(query) + '&format=json&d=1&bext=' + localStorage['os'] + 'oe', true);
70 | }
71 |
72 | req.onreadystatechange = function(data) {
73 | if (req.readyState != 4) {
74 | return;
75 | }
76 | var res = JSON.parse(req.responseText);
77 | console.log('res:', res);
78 | callback(res);
79 | };
80 |
81 | req.send(null);
82 | return true;
83 | };
84 |
85 | var background = new Background();
86 |
87 | chrome.omnibox.onInputEntered.addListener(function(text) {
88 | chrome.tabs.query({
89 | 'currentWindow': true,
90 | 'active': true
91 | }, function(tabs) {
92 | chrome.tabs.update(tabs[0].id, {
93 | url: "https://duckduckgo.com/?q=" + encodeURIComponent(text) + "&bext=" + localStorage['os'] + "ol"
94 | });
95 | });
96 | });
97 |
98 | //This adds Context Menu when user select some text.
99 | //create context menu
100 | chrome.contextMenus.create({
101 | title: 'Search DuckDuckGo for "%s"',
102 | contexts: ["selection"],
103 | onclick: function(info) {
104 | var queryText = info.selectionText;
105 | chrome.tabs.create({
106 | url: "https://duckduckgo.com/?q=" + queryText + "&bext=" + localStorage['os'] + "or"
107 | });
108 | }
109 | });
110 |
--------------------------------------------------------------------------------
/js/google.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 DuckDuckGo, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 |
18 |
19 | var options = {};
20 | var ddgBox;
21 | var ddg_zeroclick_timestamp = new Date().getTime();
22 |
23 | function init_timer() {
24 | ddg_zeroclick_timestamp = new Date().getTime();
25 | }
26 |
27 |
28 | chrome.extension.sendMessage({options: "get"}, function(opt){
29 | for (var option in opt) {
30 | options[option] = (opt[option] === 'true') ? true : false;
31 |
32 | }
33 |
34 | init_timer();
35 |
36 | ddgBox = new DuckDuckBox({
37 | inputName: 'q',
38 | forbiddenIDs: ['rg_s'],
39 | hover: true,
40 | contentDiv: (options['zeroclick_google_right']) ? 'rhs' : 'center_col',
41 | className: 'google',
42 | debug: options.dev
43 | });
44 |
45 | ddgBox.search = function(query) {
46 | var request = {query: query};
47 | chrome.extension.sendMessage(request, function(response){
48 | var time = new Date().getTime();
49 | var d = time - ddg_zeroclick_timestamp;
50 |
51 | // ditch the InstantAnswer Box if there is a Knowledge Graph
52 | // result, e.g. superbad
53 | if (document.querySelector('#rhs_block ol .xpdopen') !== null) {
54 | return true;
55 | }
56 |
57 | // ditch the InstantAnswer Box if there is an artist Knowledge
58 | // Graph result, e.g. justin bieber
59 | if (document.querySelector('#rhs_block ol .rhsvw') !== null) {
60 | return true;
61 | }
62 |
63 | if (document.querySelector('#center_col .vk_c') !== null) {
64 | return true;
65 | }
66 |
67 | if (options.dev)
68 | console.log("delay", d);
69 |
70 | if (d >= 500)
71 | return true;
72 |
73 | ddgBox.renderZeroClick(response, query);
74 | return true;
75 | });
76 |
77 | if (options.dev)
78 | console.log("asked query:", query);
79 | }
80 |
81 | ddgBox.init();
82 | });
83 |
84 | var ddg_timer;
85 |
86 | function getQuery(direct) {
87 | var instant = document.getElementsByClassName("gssb_a");
88 | if (instant.length !== 0 && !direct){
89 | var selected_instant = instant[0];
90 |
91 | var query = selected_instant.childNodes[0].childNodes[0].childNodes[0].
92 | childNodes[0].childNodes[0].childNodes[0].innerHTML;
93 | query = query.replace(/<\/?(?!\!)[^>]*>/gi, '');
94 |
95 | if(options.dev)
96 | console.log("query from hash:", query);
97 |
98 | return query;
99 | } else {
100 | return document.getElementsByName('q')[0].value;
101 | }
102 | }
103 |
104 | function qsearch(direct) {
105 | var query = getQuery(direct);
106 | ddgBox.lastQuery = query;
107 | ddgBox.search(query);
108 | init_timer();
109 | }
110 |
111 | // instant search
112 | $('[name="q"]').keyup(function(e){
113 | var query = getQuery();
114 | if(ddgBox.lastQuery !== query && query !== '')
115 | ddgBox.hideZeroClick();
116 |
117 | if(options.dev)
118 | console.log("pressed key:", e.keyCode);
119 |
120 | var fn = function(){ qsearch(); };
121 |
122 | if(e.keyCode == 40 || e.keyCode == 38)
123 | fn = function(){ qsearch(true); };
124 |
125 | clearTimeout(ddg_timer);
126 | ddg_timer = setTimeout(function(){
127 | fn();
128 | }, 700);
129 |
130 | // instant search suggestions box onclick
131 | document.getElementsByClassName("gssb_c")[0].onclick = function(){
132 | if(options.dev)
133 | console.log("clicked")
134 |
135 | ddgBox.hideZeroClick();
136 | qsearch(true);
137 | };
138 | });
139 |
140 | $('[name="btnG"]').click(function(){
141 | qsearch();
142 | });
143 |
144 |
145 |
--------------------------------------------------------------------------------
/css/common.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 DuckDuckGo, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ddg_zeroclick {
18 | background: none repeat scroll 0 0 #fff;
19 | border-top: 4px solid #ce4c15;
20 | box-shadow: 0px 1px 5px 1px #ccc;
21 | display: block;
22 | width: 554px;
23 | z-index: 10;
24 | margin-bottom: 20px;
25 | }
26 |
27 | .ddg_zeroclick_icon {
28 | display: inline;
29 | float: left;
30 | padding-left: 8px;
31 | padding-right: 10px;
32 | padding-top: 4px;
33 | }
34 |
35 | .ddg_answer {
36 | background: url(https://duckduckgo.com/icon16.png) 4px 4px no-repeat #F9F9F9 !important;
37 | line-height: 1.4;
38 | padding: 4px 0px 4px 30px !important;
39 | margin-bottom: 12px;
40 | }
41 |
42 |
43 | #ddg_zeroclick_header {
44 | padding: 4px;
45 | font-weight: bold;
46 | /*background: -webkit-gradient(linear, left top, left bottom, from(#e16036), to(#d64a2d));
47 | border-bottom: 1px solid #a1260d;
48 | border-left: 1px solid #a73010;
49 | border-right: 1px solid #a73010;
50 | border-top: 1px solid #c25322;
51 | */
52 |
53 | background: -webkit-gradient(linear, left top, left bottom, from(#da5b4a), to(#c9392c));
54 | background: -moz-linear-gradient(to bottom, #da5b4a, #c9392c);
55 | background: -o-linear-gradient(#da5b4a, #c9392c);
56 |
57 | border: 1px solid #c23d2a;
58 | margin: -1px;
59 | border-top-left-radius: 2px;
60 | border-top-right-radius: 2px;
61 |
62 |
63 | font-family: "Helvetica Neue", sans-serif;
64 | }
65 |
66 | #ddg_zeroclick_header img {
67 | margin-top: -4px;
68 | float: right;
69 | }
70 |
71 | #ddg_zeroclick_header a, #ddg_zeroclick_header a:active {
72 | color: #fff !important;
73 | }
74 |
75 |
76 | #ddg_zeroclick_image {
77 | margin: 14px;
78 | float: left;
79 | }
80 |
81 | #ddg_zeroclick_image img {
82 | padding: 1px;
83 | border-radius: 2px;
84 | }
85 |
86 | .ddg_zeroclick_img {
87 | max-width: 100px;
88 | max-height: 120px;
89 | }
90 |
91 | #ddg_zeroclick_right_text {
92 | padding: 10px;
93 | }
94 |
95 | #ddg_zeroclick_title {
96 | margin: 0;
97 | margin-top: 13px;
98 | }
99 |
100 | #ddg_zeroclick_abstract {
101 | margin-top: 12px;
102 | margin-right: 40px;
103 |
104 | word-wrap: break-word;
105 | font-size: 13px;
106 | color: #505050;
107 | }
108 |
109 | #ddg_zeroclick_abstract > div{
110 | padding-left: 2px;
111 | }
112 |
113 | #ddg_zeroclick_abstract p {
114 | line-height: 16px;
115 | font-family: "Helvetica Neue", sans-serif;
116 | color: #202020;
117 | padding: 5px 0;
118 | margin: 0;
119 | }
120 |
121 | #ddg_zeroclick_abstract a{
122 | text-decoration: none;
123 | color: #0033cc;
124 | }
125 |
126 | #ddg_zeroclick_abstract a:hover {
127 | text-decoration: underline;
128 | }
129 |
130 | .first_category {
131 | }
132 |
133 | #ddg_zeroclick_answer {
134 | padding: 14px;
135 | }
136 |
137 | #ddg_zeroclick_answer_title {
138 | font-size: 24px;
139 | }
140 |
141 | #ddg_zeroclick_answer_category {
142 | font-size: 14px;
143 | color: #989898;
144 | }
145 |
146 | #ddg_zeroclick_bottom {
147 | height: 40px;
148 | background-color: #f7f7f7;
149 | }
150 |
151 | #ddg_zeroclick_official_links {
152 | color: #767676;
153 | padding: 10px;
154 | float:left;
155 | }
156 |
157 | #ddg_zeroclick_official_links_img {
158 | float: right;
159 | position: relative;
160 | top: 8px;
161 | right: 8px;
162 | }
163 |
164 | #ddg_zeroclick_official_links img{
165 | display: inline;
166 | padding-right: 5px;
167 | width: 16px;
168 | height: 16px;
169 | position: relative;
170 | top: 2px;
171 | }
172 |
173 |
174 | #ddg_zeroclick_official_links a {
175 | text-decoration: none;
176 | color: #0037cc;
177 | }
178 |
179 | #ddg_zeroclick_header a {
180 | text-decoration: none;
181 | color: #fff;
182 | }
183 |
184 | #ddg_zeroclick_header a:hover {
185 | text-decoration: underline;
186 | }
187 |
188 | .ddg_zeroclick_category{
189 | /* background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQQAKCgoJiYmIaGho6OjqSkpHt7e35+fq6urqurq4KCgoqKipycnJOTk3h4eLCwsKioqP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAQABAAAAVYICQ6ZGmWInSkLLu2cIo8dG3X4kPE7A4RAF4qCAEsRIuk8ghhLgJCERQSYIgY2KwVsmUMopBvWCFSmM9kSFohALchgoQoQaez5HQDWC8qgP0iDYKDhIMpIQA7"); */
190 | background-image: url(https://duckduckgo.com/assets/icon_category.v101.png);
191 | background-repeat: no-repeat;
192 | line-height: 22px;
193 | border: 1px solid #fafafa;
194 | }
195 |
196 |
197 | .ddg_zeroclick_article{
198 | /* background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQQAKCgoJiYmIaGho6OjqSkpHt7e35+fq6urqurq4KCgoqKipycnJOTk3h4eLCwsKioqP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAQABAAAAVYICQ6ZGmWInSkLLu2cIo8dG3X4kPE7A4RAF4qCAEsRIuk8ghhLgJCERQSYIgY2KwVsmUMopBvWCFSmM9kSFohALchgoQoQaez5HQDWC8qgP0iDYKDhIMpIQA7"); */
199 | background-image: url(https://duckduckgo.com/assets/icon_article.v101.png);
200 | background-repeat: no-repeat;
201 | line-height: 22px;
202 | border: 1px solid #fafafa;
203 | }
204 |
205 | .ddg_zeroclick_more{
206 | background-image: url(https://duckduckgo.com/assets/icon_ellipsis.v101.png);
207 | background-repeat: no-repeat;
208 | line-height: 22px;
209 | border: 1px solid #fafafa;
210 | }
211 |
212 | .ddg_zeroclick_disambig {
213 | line-height: 1.4;
214 | padding: 4px;
215 | margin-left: 48px;
216 | border: 1px solid #fafafa;
217 | }
218 |
219 | #ddg_zeroclick .icon_disambig {
220 | padding-top: 5px;
221 | float: left;
222 | text-align: right;
223 | width: 48px;
224 | display: block;
225 | }
226 |
227 | #ddg_zeroclick .icon_disambig img {
228 | max-height: 40px;
229 | max-width: 40px;
230 | display: inline;
231 | margin-top: 2px;
232 | padding-right: 4px;
233 | }
234 |
235 | #ddg_zeroclick .icon_category {
236 | text-align: right;
237 | width: 58px;
238 | max-height: 50px;
239 | float: left;
240 | padding: 5px 0px 2px 2px;
241 | }
242 |
243 | #ddg_zeroclick .icon_category img {
244 | max-height: 50px;
245 | max-width: 50px;
246 | }
247 |
248 | #ddg_zeroclick .ddg_zeroclick_category_item {
249 | line-height: 1.4;
250 | padding: 4px;
251 | min-height: 30px;
252 | margin-left: 62px;
253 | }
254 |
255 | #ddg_zeroclick .ddg_zeroclick_category_item a {
256 | font-size: 1.2em;
257 | }
258 |
259 | #ddg_zeroclick .disambig_holder {
260 | margin: 3px;
261 | }
262 |
263 | #ddg_zeroclick .disambig_more {
264 | border: 1px solid #fafafa;
265 | margin-left: 52px !important;
266 | padding: 4px;
267 | clear: left;
268 | }
269 |
270 | #ddg_zeroclick .disambig_more hr {
271 | width: 85%;
272 | height: 1px;
273 | margin: 0;
274 | padding: 0;
275 | border: none;
276 | color: #BADE89;
277 | background-color: #D2D2D2;
278 | text-align: left;
279 | }
280 |
281 | #ddg_zeroclick .ddg_selected{
282 | background-color: #efefef !important;
283 | border-radius: 2px;
284 | border: 1px solid #c2c2c2 !important;
285 | cursor: pointer;
286 | }
287 |
288 | #ddg_zeroclick .category_more {
289 | padding: 4px 4px 4px 68px !important;
290 | width: 460px;
291 | }
292 |
293 |
294 | #ddg_zeroclick .ddg_zeroclick_category_img {
295 | max-height: 30px;
296 | max-width: 30px;
297 | }
298 |
299 |
300 | #ddg_zeroclick .wrapper {
301 | clear: left;
302 | padding-bottom: 3px;
303 | border: 1px solid #fafafa;
304 | }
305 |
306 | #ddg_zeroclick .ddg_more {
307 | font-size: 12px;
308 | float: right;
309 | font-weight: normal;
310 | line-height: 24px;
311 | }
312 |
313 | #ddg_zeroclick .ddg_more_link {
314 | padding-right: 3px;
315 | }
316 |
317 | #ddg_zeroclick .ddg_head {
318 | font-size: 18px;
319 | line-height: 24px;
320 | padding-left: 5px;
321 | text-shadow: 0px -1px 0px #7d320d;
322 | }
323 |
324 | #ddg_zeroclick .clear {
325 | clear: both;
326 | height: 0;
327 | font-size: 0;
328 | line-height: 0;
329 | }
330 |
331 | /* Show more/less button */
332 |
333 | /* This is the gray circle: */
334 | .ddg_zeroclick_summary_icon {
335 | ext-align: center;
336 | display: inline-block;
337 | vertical-align: middle;
338 | background-color: #d3d3d3;
339 | margin-right: 0.25em;
340 | position: relative;
341 | text-indent: 0.125em;
342 | line-height: 1.8;
343 | width: 18px;
344 | height: 18px;
345 | top: -0.1em;
346 | border-radius: 50%;
347 | }
348 |
349 | /* This draws the down arrow: */
350 | .ddg_zeroclick_summary_icon:after {
351 | content: '';
352 | border: 3px solid transparent;
353 | border-top-color: #707070;
354 | border-top-width: 5px;
355 | border-bottom-width: 0;
356 | position: absolute;
357 | top: 50%;
358 | left: 50%;
359 | margin-top: -2px;
360 | margin-left: -3px;
361 | width: 0;
362 | height: 0;
363 | }
364 |
365 | /* This modifies the arrow to flip it upside down when it's expanded: */
366 | .ddg_zeroclick_summary_show_more.ddg_zeroclick_summary_is-expanded .ddg_zeroclick_summary_icon:after {
367 | border-top-width: 0;
368 | border-top-color: transparent;
369 | border-bottom-color: #707070;
370 | border-bottom-width: 5px;
371 | margin-top: -3px;
372 | }
373 |
374 | .ddg_zeroclick_summary_show_more {
375 | cursor: pointer;
376 | }
377 |
378 | .ddg_zeroclick_summary_expand-less,
379 | .ddg_zeroclick_summary_show_more.ddg_zeroclick_summary_is-expanded .ddg_zeroclick_summary_expand-more {
380 | display: none;
381 | }
382 |
383 | .ddg_zeroclick_summary_expand-more,
384 | .ddg_zeroclick_summary_show_more.ddg_zeroclick_summary_is-expanded .ddg_zeroclick_summary_expand-less {
385 | display: inline-block;
386 | }
387 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | This license does not apply to any DuckDuckGo logos or marks that may be contained
2 | in this repo. DuckDuckGo logos and marks are licensed separately under the CCBY-NC-ND 4.0
3 | license (https://creativecommons.org/licenses/by-nc-nd/4.0/), and official up-to-date
4 | versions can be downloaded from https://duckduckgo.com/press.
5 |
6 | Apache License
7 | Version 2.0, January 2004
8 | http://www.apache.org/licenses/
9 |
10 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11 |
12 | 1. Definitions.
13 |
14 | "License" shall mean the terms and conditions for use, reproduction,
15 | and distribution as defined by Sections 1 through 9 of this document.
16 |
17 | "Licensor" shall mean the copyright owner or entity authorized by
18 | the copyright owner that is granting the License.
19 |
20 | "Legal Entity" shall mean the union of the acting entity and all
21 | other entities that control, are controlled by, or are under common
22 | control with that entity. For the purposes of this definition,
23 | "control" means (i) the power, direct or indirect, to cause the
24 | direction or management of such entity, whether by contract or
25 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
26 | outstanding shares, or (iii) beneficial ownership of such entity.
27 |
28 | "You" (or "Your") shall mean an individual or Legal Entity
29 | exercising permissions granted by this License.
30 |
31 | "Source" form shall mean the preferred form for making modifications,
32 | including but not limited to software source code, documentation
33 | source, and configuration files.
34 |
35 | "Object" form shall mean any form resulting from mechanical
36 | transformation or translation of a Source form, including but
37 | not limited to compiled object code, generated documentation,
38 | and conversions to other media types.
39 |
40 | "Work" shall mean the work of authorship, whether in Source or
41 | Object form, made available under the License, as indicated by a
42 | copyright notice that is included in or attached to the work
43 | (an example is provided in the Appendix below).
44 |
45 | "Derivative Works" shall mean any work, whether in Source or Object
46 | form, that is based on (or derived from) the Work and for which the
47 | editorial revisions, annotations, elaborations, or other modifications
48 | represent, as a whole, an original work of authorship. For the purposes
49 | of this License, Derivative Works shall not include works that remain
50 | separable from, or merely link (or bind by name) to the interfaces of,
51 | the Work and Derivative Works thereof.
52 |
53 | "Contribution" shall mean any work of authorship, including
54 | the original version of the Work and any modifications or additions
55 | to that Work or Derivative Works thereof, that is intentionally
56 | submitted to Licensor for inclusion in the Work by the copyright owner
57 | or by an individual or Legal Entity authorized to submit on behalf of
58 | the copyright owner. For the purposes of this definition, "submitted"
59 | means any form of electronic, verbal, or written communication sent
60 | to the Licensor or its representatives, including but not limited to
61 | communication on electronic mailing lists, source code control systems,
62 | and issue tracking systems that are managed by, or on behalf of, the
63 | Licensor for the purpose of discussing and improving the Work, but
64 | excluding communication that is conspicuously marked or otherwise
65 | designated in writing by the copyright owner as "Not a Contribution."
66 |
67 | "Contributor" shall mean Licensor and any individual or Legal Entity
68 | on behalf of whom a Contribution has been received by Licensor and
69 | subsequently incorporated within the Work.
70 |
71 | 2. Grant of Copyright License. Subject to the terms and conditions of
72 | this License, each Contributor hereby grants to You a perpetual,
73 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74 | copyright license to reproduce, prepare Derivative Works of,
75 | publicly display, publicly perform, sublicense, and distribute the
76 | Work and such Derivative Works in Source or Object form.
77 |
78 | 3. Grant of Patent License. Subject to the terms and conditions of
79 | this License, each Contributor hereby grants to You a perpetual,
80 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81 | (except as stated in this section) patent license to make, have made,
82 | use, offer to sell, sell, import, and otherwise transfer the Work,
83 | where such license applies only to those patent claims licensable
84 | by such Contributor that are necessarily infringed by their
85 | Contribution(s) alone or by combination of their Contribution(s)
86 | with the Work to which such Contribution(s) was submitted. If You
87 | institute patent litigation against any entity (including a
88 | cross-claim or counterclaim in a lawsuit) alleging that the Work
89 | or a Contribution incorporated within the Work constitutes direct
90 | or contributory patent infringement, then any patent licenses
91 | granted to You under this License for that Work shall terminate
92 | as of the date such litigation is filed.
93 |
94 | 4. Redistribution. You may reproduce and distribute copies of the
95 | Work or Derivative Works thereof in any medium, with or without
96 | modifications, and in Source or Object form, provided that You
97 | meet the following conditions:
98 |
99 | (a) You must give any other recipients of the Work or
100 | Derivative Works a copy of this License; and
101 |
102 | (b) You must cause any modified files to carry prominent notices
103 | stating that You changed the files; and
104 |
105 | (c) You must retain, in the Source form of any Derivative Works
106 | that You distribute, all copyright, patent, trademark, and
107 | attribution notices from the Source form of the Work,
108 | excluding those notices that do not pertain to any part of
109 | the Derivative Works; and
110 |
111 | (d) If the Work includes a "NOTICE" text file as part of its
112 | distribution, then any Derivative Works that You distribute must
113 | include a readable copy of the attribution notices contained
114 | within such NOTICE file, excluding those notices that do not
115 | pertain to any part of the Derivative Works, in at least one
116 | of the following places: within a NOTICE text file distributed
117 | as part of the Derivative Works; within the Source form or
118 | documentation, if provided along with the Derivative Works; or,
119 | within a display generated by the Derivative Works, if and
120 | wherever such third-party notices normally appear. The contents
121 | of the NOTICE file are for informational purposes only and
122 | do not modify the License. You may add Your own attribution
123 | notices within Derivative Works that You distribute, alongside
124 | or as an addendum to the NOTICE text from the Work, provided
125 | that such additional attribution notices cannot be construed
126 | as modifying the License.
127 |
128 | You may add Your own copyright statement to Your modifications and
129 | may provide additional or different license terms and conditions
130 | for use, reproduction, or distribution of Your modifications, or
131 | for any such Derivative Works as a whole, provided Your use,
132 | reproduction, and distribution of the Work otherwise complies with
133 | the conditions stated in this License.
134 |
135 | 5. Submission of Contributions. Unless You explicitly state otherwise,
136 | any Contribution intentionally submitted for inclusion in the Work
137 | by You to the Licensor shall be under the terms and conditions of
138 | this License, without any additional terms or conditions.
139 | Notwithstanding the above, nothing herein shall supersede or modify
140 | the terms of any separate license agreement you may have executed
141 | with Licensor regarding such Contributions.
142 |
143 | 6. Trademarks. This License does not grant permission to use the trade
144 | names, trademarks, service marks, or product names of the Licensor,
145 | except as required for reasonable and customary use in describing the
146 | origin of the Work and reproducing the content of the NOTICE file.
147 |
148 | 7. Disclaimer of Warranty. Unless required by applicable law or
149 | agreed to in writing, Licensor provides the Work (and each
150 | Contributor provides its Contributions) on an "AS IS" BASIS,
151 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
152 | implied, including, without limitation, any warranties or conditions
153 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
154 | PARTICULAR PURPOSE. You are solely responsible for determining the
155 | appropriateness of using or redistributing the Work and assume any
156 | risks associated with Your exercise of permissions under this License.
157 |
158 | 8. Limitation of Liability. In no event and under no legal theory,
159 | whether in tort (including negligence), contract, or otherwise,
160 | unless required by applicable law (such as deliberate and grossly
161 | negligent acts) or agreed to in writing, shall any Contributor be
162 | liable to You for damages, including any direct, indirect, special,
163 | incidental, or consequential damages of any character arising as a
164 | result of this License or out of the use or inability to use the
165 | Work (including but not limited to damages for loss of goodwill,
166 | work stoppage, computer failure or malfunction, or any and all
167 | other commercial damages or losses), even if such Contributor
168 | has been advised of the possibility of such damages.
169 |
170 | 9. Accepting Warranty or Additional Liability. While redistributing
171 | the Work or Derivative Works thereof, You may choose to offer,
172 | and charge a fee for, acceptance of support, warranty, indemnity,
173 | or other liability obligations and/or rights consistent with this
174 | License. However, in accepting such obligations, You may act only
175 | on Your own behalf and on Your sole responsibility, not on behalf
176 | of any other Contributor, and only if You agree to indemnify,
177 | defend, and hold each Contributor harmless for any liability
178 | incurred by, or claims asserted against, such Contributor by reason
179 | of your accepting any such warranty or additional liability.
180 |
181 | END OF TERMS AND CONDITIONS
182 |
183 | APPENDIX: How to apply the Apache License to your work.
184 |
185 | To apply the Apache License to your work, attach the following
186 | boilerplate notice, with the fields enclosed by brackets "[]"
187 | replaced with your own identifying information. (Don't include
188 | the brackets!) The text should be enclosed in the appropriate
189 | comment syntax for the file format. We also recommend that a
190 | file or class name and description of purpose be included on the
191 | same "printed page" as the copyright notice for easier
192 | identification within third-party archives.
193 |
194 | Copyright [yyyy] [name of copyright owner]
195 |
196 | Licensed under the Apache License, Version 2.0 (the "License");
197 | you may not use this file except in compliance with the License.
198 | You may obtain a copy of the License at
199 |
200 | http://www.apache.org/licenses/LICENSE-2.0
201 |
202 | Unless required by applicable law or agreed to in writing, software
203 | distributed under the License is distributed on an "AS IS" BASIS,
204 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205 | See the License for the specific language governing permissions and
206 | limitations under the License.
207 |
--------------------------------------------------------------------------------
/js/popup.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2012, 2016 DuckDuckGo, Inc.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | */
17 |
18 | var ICON_MAXIMIZE = "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDIwIDIwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PGcgaWQ9Im1heGltaXplIj48cGF0aCBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbDojQUFBQUFBOyIgZD0iTTEwLDBjNS41LDAsMTAsNC41LDEwLDEwYzAsNS41LTQuNSwxMC0xMCwxMFMwLDE1LjUsMCwxMEMwLDQuNSw0LjUsMCwxMCwweiIvPjxnPjxnPjxwb2x5Z29uIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsOiNGRkZGRkY7IiBwb2ludHM9IjE0LDkgMTEsOSAxMSw2IDksNiA5LDkgNiw5IDYsMTEgOSwxMSA5LDE0IDExLDE0IDExLDExIDE0LDExICIvPjwvZz48L2c+PC9nPjwvc3ZnPg==";
19 |
20 | var ICON_MINIMIZE = "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDIwIDIwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PGcgaWQ9Im1pbmltaXplIj48cGF0aCBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbDojQUFBQUFBOyIgZD0iTTEwLDBjNS41LDAsMTAsNC41LDEwLDEwYzAsNS41LTQuNSwxMC0xMCwxMFMwLDE1LjUsMCwxMEMwLDQuNSw0LjUsMCwxMCwweiIvPjxwYXRoIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsOiNGRkZGRkY7IiBkPSJNMTQsOXYySDZWOUgxNHoiLz48L2c+PC9zdmc+"
21 |
22 | var BTN_NORMAL = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDE2IDE2IiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iIzYxQTVEQSIgZD0iTTE0LDE2SDJjLTEuMSwwLTItMC45LTItMlYyYzAtMS4xLDAuOS0yLDItMmgxMmMxLjEsMCwyLDAuOSwyLDJ2MTJDMTYsMTUuMSwxNS4xLDE2LDE0LDE2eiIvPjxwb2x5Z29uIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsPSIjRkZGRkZGIiBwb2ludHM9IjEyLDcgOSw3IDksNCA3LDQgNyw3IDQsNyA0LDkgNyw5IDcsMTIgOSwxMiA5LDkgMTIsOSAiLz48L3N2Zz4=";
23 |
24 | var BTN_HOVER = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDE2IDE2IiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iIzQ0OTVENCIgZD0iTTE0LDE2SDJjLTEuMSwwLTItMC45LTItMlYyYzAtMS4xLDAuOS0yLDItMmgxMmMxLjEsMCwyLDAuOSwyLDJ2MTJDMTYsMTUuMSwxNS4xLDE2LDE0LDE2eiIvPjxwb2x5Z29uIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsPSIjRkZGRkZGIiBwb2ludHM9IjEyLDcgOSw3IDksNCA3LDQgNyw3IDQsNyA0LDkgNyw5IDcsMTIgOSwxMiA5LDkgMTIsOSAiLz48L3N2Zz4=";
25 |
26 | var FAKE_POST_FUNCTION =
27 | " function fake_post() {" +
28 | " var form = document.createElement('form');" +
29 | " form.setAttribute('method', 'post');" +
30 | " form.setAttribute('action', 'https://duckduckgo.com');" +
31 | " var params = {{{PARAMS}}};" +
32 | " for(var key in params) {" +
33 | " var hiddenField = document.createElement('input');" +
34 | " hiddenField.setAttribute('type', 'hidden');" +
35 | " hiddenField.setAttribute('name', key);" +
36 | " hiddenField.setAttribute('value', params[key]);" +
37 | " form.appendChild(hiddenField);" +
38 | " }" +
39 | " document.body.appendChild(form);" +
40 | " form.submit();" +
41 | " }";
42 |
43 | window.onload = function() {
44 |
45 | document.getElementById('search_form_input_homepage').focus();
46 |
47 | document.getElementById('search_form_homepage').onsubmit = search;
48 | document.getElementById('search_form_input_clear').onclick = search_input_clear;
49 |
50 | var prefill_text = 'Search DuckDuckGo...';
51 |
52 | if (localStorage['meanings'] == undefined) {
53 | localStorage['meanings'] = 'true';
54 | }
55 |
56 | if (localStorage['advanced_options'] == undefined){
57 | localStorage['advanced_options'] = 'true';
58 | }
59 |
60 | if (localStorage['zeroclickinfo'] == undefined) {
61 | localStorage['zeroclickinfo'] = 'true';
62 | }
63 |
64 | if (localStorage['last_search'] != '') {
65 | document.getElementById('search_form_input_homepage').value = localStorage['last_search'];
66 | document.getElementById("search_form_input_clear").style.display = 'inline-block';
67 | document.getElementById("search_button_homepage").className = 'selected';
68 | document.getElementById('search_form_input_homepage').select();
69 | }
70 |
71 |
72 | document.getElementById('adv_ducky').onclick = ducky_check;
73 | document.getElementById('adv_meanings').onclick = meanings_check;
74 | document.getElementById('adv_zeroclick').onclick = zeroclickinfo_check;
75 |
76 | document.getElementById('addons').onclick = function(){
77 | chrome.tabs.create({url: "html/options.html"});
78 | }
79 |
80 |
81 | document.getElementById('bang_w').onclick = function(){
82 | add_bang('!w');
83 | }
84 | document.getElementById('bang_bi').onclick = function(){
85 | add_bang('!bi');
86 | }
87 | document.getElementById('bang_a').onclick = function(){
88 | add_bang('!a');
89 | }
90 | document.getElementById('bang_gi').onclick = function(){
91 | add_bang('!gi');
92 | }
93 | document.getElementById('bang_n').onclick = function(){
94 | add_bang('!n');
95 | }
96 | document.getElementById('bang_yt').onclick = function(){
97 | add_bang('!yt');
98 | }
99 | document.getElementById('bang_m').onclick = function(){
100 | add_bang('!m');
101 | }
102 |
103 | var images = document.querySelectorAll('li img');
104 | for(var i = 0; i < images.length; i++) {
105 | images[i].onmouseover = function() {
106 | this.src = BTN_HOVER;
107 | }
108 |
109 | images[i].onmouseout = function() {
110 | this.src = BTN_NORMAL;
111 | }
112 | }
113 |
114 | defaults_check();
115 |
116 | chrome.extension.onMessage.addListener(function(request, sender, sendResponse){
117 | defaults_check();
118 | });
119 |
120 |
121 | if (localStorage['advanced_options'] !== 'true') {
122 | document.getElementById('icon_advanced').src = ICON_MAXIMIZE;
123 | document.getElementById('advanced').style.display = 'none';
124 | document.getElementById('icon_advanced').className = 'minimized';
125 | }
126 |
127 |
128 | setTimeout(function(){
129 | document.getElementById("search_form_input_homepage").focus();
130 | document.getElementById("search_form_input_homepage").onkeydown = function(){
131 | document.getElementById("search_form_input_clear").style.display = 'inline-block';
132 | document.getElementById("search_button_homepage").className = 'selected';
133 | this.style.color = '#000000';
134 | };
135 | document.getElementById("search_form_input_homepage").onkeyup = function(){
136 | if (this.value == '') {
137 | this.style.color = '#999999';
138 | search_input_clear();
139 | }
140 | };
141 | }, 300);
142 |
143 |
144 | function search(){
145 | var input = document.getElementById("search_form_input_homepage").value;
146 |
147 | if (localStorage['lastsearch_enabled'] === 'false')
148 | localStorage['last_search'] = '';
149 | else
150 | localStorage['last_search'] = input;
151 |
152 | if (document.getElementById('adv_ducky').checked === true) {
153 | input = "\\" + input;
154 | }
155 |
156 | var special = '';
157 | if(document.getElementById('adv_meanings').checked !== true) {
158 | special = '&d=1';
159 | }
160 |
161 | if (localStorage['safesearch'] === 'false')
162 | special += '&kp=-1'
163 |
164 | var os = "o";
165 | if (window.navigator.userAgent.indexOf("Windows") != -1) os = "w";
166 | if (window.navigator.userAgent.indexOf("Mac") != -1) os = "m";
167 | if (window.navigator.userAgent.indexOf("Linux") != -1) os = "l";
168 |
169 | special += '&bext=' + os + 'op';
170 |
171 | if (localStorage['use_post'] === 'true') {
172 | var fake_post_code = FAKE_POST_FUNCTION.replace(/(\n|\t)/gm,'');
173 |
174 | var params = {
175 | q: input,
176 | d: (special == '') ? 0 : 1
177 | };
178 |
179 | fake_post_code = fake_post_code.replace('{{{PARAMS}}}', JSON.stringify(params));
180 |
181 | chrome.tabs.create({
182 | url: "javascript:" + fake_post_code + "; fake_post();"
183 | });
184 | } else {
185 | chrome.tabs.create({
186 | url: "https://duckduckgo.com/?q="+encodeURIComponent(input)+special
187 | });
188 | }
189 | }
190 |
191 | document.getElementById('icon_advanced').onclick = function(){
192 | if (this.className == 'minimized') {
193 | this.src = ICON_MINIMIZE;
194 | document.getElementById('advanced').style.display = 'block';
195 | this.className = 'maximized';
196 | } else {
197 | this.src = ICON_MAXIMIZE;
198 | document.getElementById('advanced').style.display = 'none';
199 | this.className = 'minimized';
200 | }
201 | localStorage['advanced_options'] = (document.getElementById('advanced').style.display === 'block');
202 | document.getElementById('search_form_input_homepage').focus();
203 | }
204 |
205 | function add_bang(bang) {
206 | var inp = document.getElementById('search_form_input_homepage');
207 |
208 | var bang_regex = /\!\w+/;
209 |
210 | document.getElementById("search_form_input_clear").style.display= 'inline-block';
211 | document.getElementById("search_button_homepage").className = 'selected';
212 |
213 | if (inp.value === '') {
214 | inp.style.color = '#000';
215 | inp.value = bang + ' ';
216 | inp.focus();
217 | } else {
218 | var found_bangs = bang_regex.exec(inp.value);
219 | if (found_bangs !== null) {
220 | inp.value = inp.value.replace(found_bangs[0], bang);
221 | inp.focus();
222 | } else {
223 | inp.value += bang;
224 | search();
225 | }
226 | }
227 | }
228 |
229 | function ducky_check(){
230 | localStorage['ducky'] = document.getElementById('adv_ducky').checked;
231 | }
232 |
233 | function meanings_check(){
234 | localStorage['meanings'] = document.getElementById('adv_meanings').checked;
235 | }
236 |
237 | function zeroclickinfo_check(){
238 | localStorage['zeroclickinfo'] = document.getElementById('adv_zeroclick').checked;
239 | }
240 |
241 | function defaults_check(){
242 | if (localStorage['ducky'] === 'true') {
243 | document.getElementById('adv_ducky').checked = true;
244 | }
245 |
246 | if (localStorage['meanings'] === 'true') {
247 | document.getElementById('adv_meanings').checked = true;
248 | }
249 |
250 | if (localStorage['zeroclickinfo'] === 'true') {
251 | document.getElementById('adv_zeroclick').checked = true;
252 | }
253 |
254 | }
255 |
256 | function search_input_clear() {
257 | document.getElementById('search_form_input_homepage').value = '';
258 | document.getElementById("search_form_input_clear").style.display= 'none';
259 | document.getElementById('search_form_input_homepage').focus();
260 | document.getElementById("search_button_homepage").className = '';
261 | localStorage['last_search'] = '';
262 | }
263 | }
264 |
265 |
--------------------------------------------------------------------------------
/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "DuckDuckGo for Opera",
3 | "version": "1.4.5",
4 | "description": "DuckDuckGo enhancements for Opera.",
5 | "icons": {
6 | "16": "img/icon_16.png",
7 | "48": "img/icon_48.png",
8 | "128": "img/icon_128.png"
9 | },
10 | "manifest_version": 2,
11 | "browser_action": {
12 | "default_icon": {
13 | "19": "img/icon_19.png",
14 | "38": "img/icon_38.png"
15 | },
16 | "default_popup": "html/popup.html"
17 | },
18 | "commands": {
19 | "_execute_browser_action": {
20 | "suggested_key": {
21 | "default": "Alt+G",
22 | "mac": "Alt+G",
23 | "linux": "Alt+G",
24 | "windows": "Alt+G"
25 | }
26 | }
27 | },
28 | "omnibox": {"keyword": "d"},
29 | "content_scripts": [
30 | {
31 | "matches": [
32 | "http://www.google.com/*",
33 | "http://www.google.ad/*",
34 | "http://www.google.ae/*",
35 | "http://www.google.com.af/*",
36 | "http://www.google.com.ag/*",
37 | "http://www.google.com.ai/*",
38 | "http://www.google.am/*",
39 | "http://www.google.co.ao/*",
40 | "http://www.google.com.ar/*",
41 | "http://www.google.as/*",
42 | "http://www.google.at/*",
43 | "http://www.google.com.au/*",
44 | "http://www.google.az/*",
45 | "http://www.google.ba/*",
46 | "http://www.google.com.bd/*",
47 | "http://www.google.be/*",
48 | "http://www.google.bf/*",
49 | "http://www.google.bg/*",
50 | "http://www.google.com.bh/*",
51 | "http://www.google.bi/*",
52 | "http://www.google.bj/*",
53 | "http://www.google.com.bn/*",
54 | "http://www.google.com.bo/*",
55 | "http://www.google.com.br/*",
56 | "http://www.google.bs/*",
57 | "http://www.google.co.bw/*",
58 | "http://www.google.by/*",
59 | "http://www.google.com.bz/*",
60 | "http://www.google.ca/*",
61 | "http://www.google.cd/*",
62 | "http://www.google.cf/*",
63 | "http://www.google.cg/*",
64 | "http://www.google.ch/*",
65 | "http://www.google.ci/*",
66 | "http://www.google.co.ck/*",
67 | "http://www.google.cl/*",
68 | "http://www.google.cm/*",
69 | "http://www.google.cn/*",
70 | "http://www.google.com.co/*",
71 | "http://www.google.co.cr/*",
72 | "http://www.google.com.cu/*",
73 | "http://www.google.cv/*",
74 | "http://www.google.cz/*",
75 | "http://www.google.de/*",
76 | "http://www.google.dj/*",
77 | "http://www.google.dk/*",
78 | "http://www.google.dm/*",
79 | "http://www.google.com.do/*",
80 | "http://www.google.dz/*",
81 | "http://www.google.com.ec/*",
82 | "http://www.google.ee/*",
83 | "http://www.google.com.eg/*",
84 | "http://www.google.es/*",
85 | "http://www.google.com.et/*",
86 | "http://www.google.fi/*",
87 | "http://www.google.com.fj/*",
88 | "http://www.google.fm/*",
89 | "http://www.google.fr/*",
90 | "http://www.google.ga/*",
91 | "http://www.google.ge/*",
92 | "http://www.google.gg/*",
93 | "http://www.google.com.gh/*",
94 | "http://www.google.com.gi/*",
95 | "http://www.google.gl/*",
96 | "http://www.google.gm/*",
97 | "http://www.google.gp/*",
98 | "http://www.google.gr/*",
99 | "http://www.google.com.gt/*",
100 | "http://www.google.gy/*",
101 | "http://www.google.com.hk/*",
102 | "http://www.google.hn/*",
103 | "http://www.google.hr/*",
104 | "http://www.google.ht/*",
105 | "http://www.google.hu/*",
106 | "http://www.google.co.id/*",
107 | "http://www.google.ie/*",
108 | "http://www.google.co.il/*",
109 | "http://www.google.im/*",
110 | "http://www.google.co.in/*",
111 | "http://www.google.iq/*",
112 | "http://www.google.is/*",
113 | "http://www.google.it/*",
114 | "http://www.google.je/*",
115 | "http://www.google.com.jm/*",
116 | "http://www.google.jo/*",
117 | "http://www.google.co.jp/*",
118 | "http://www.google.co.ke/*",
119 | "http://www.google.com.kh/*",
120 | "http://www.google.ki/*",
121 | "http://www.google.kg/*",
122 | "http://www.google.co.kr/*",
123 | "http://www.google.com.kw/*",
124 | "http://www.google.kz/*",
125 | "http://www.google.la/*",
126 | "http://www.google.com.lb/*",
127 | "http://www.google.li/*",
128 | "http://www.google.lk/*",
129 | "http://www.google.co.ls/*",
130 | "http://www.google.lt/*",
131 | "http://www.google.lu/*",
132 | "http://www.google.lv/*",
133 | "http://www.google.com.ly/*",
134 | "http://www.google.co.ma/*",
135 | "http://www.google.md/*",
136 | "http://www.google.me/*",
137 | "http://www.google.mg/*",
138 | "http://www.google.mk/*",
139 | "http://www.google.ml/*",
140 | "http://www.google.mn/*",
141 | "http://www.google.ms/*",
142 | "http://www.google.com.mt/*",
143 | "http://www.google.mu/*",
144 | "http://www.google.mv/*",
145 | "http://www.google.mw/*",
146 | "http://www.google.com.mx/*",
147 | "http://www.google.com.my/*",
148 | "http://www.google.co.mz/*",
149 | "http://www.google.com.na/*",
150 | "http://www.google.com.nf/*",
151 | "http://www.google.com.ng/*",
152 | "http://www.google.com.ni/*",
153 | "http://www.google.ne/*",
154 | "http://www.google.nl/*",
155 | "http://www.google.no/*",
156 | "http://www.google.com.np/*",
157 | "http://www.google.nr/*",
158 | "http://www.google.nu/*",
159 | "http://www.google.co.nz/*",
160 | "http://www.google.com.om/*",
161 | "http://www.google.com.pa/*",
162 | "http://www.google.com.pe/*",
163 | "http://www.google.com.ph/*",
164 | "http://www.google.com.pk/*",
165 | "http://www.google.pl/*",
166 | "http://www.google.pn/*",
167 | "http://www.google.com.pr/*",
168 | "http://www.google.ps/*",
169 | "http://www.google.pt/*",
170 | "http://www.google.com.py/*",
171 | "http://www.google.com.qa/*",
172 | "http://www.google.ro/*",
173 | "http://www.google.ru/*",
174 | "http://www.google.rw/*",
175 | "http://www.google.com.sa/*",
176 | "http://www.google.com.sb/*",
177 | "http://www.google.sc/*",
178 | "http://www.google.se/*",
179 | "http://www.google.com.sg/*",
180 | "http://www.google.sh/*",
181 | "http://www.google.si/*",
182 | "http://www.google.sk/*",
183 | "http://www.google.com.sl/*",
184 | "http://www.google.sn/*",
185 | "http://www.google.so/*",
186 | "http://www.google.sm/*",
187 | "http://www.google.st/*",
188 | "http://www.google.com.sv/*",
189 | "http://www.google.td/*",
190 | "http://www.google.tg/*",
191 | "http://www.google.co.th/*",
192 | "http://www.google.com.tj/*",
193 | "http://www.google.tk/*",
194 | "http://www.google.tl/*",
195 | "http://www.google.tm/*",
196 | "http://www.google.tn/*",
197 | "http://www.google.to/*",
198 | "http://www.google.com.tr/*",
199 | "http://www.google.tt/*",
200 | "http://www.google.com.tw/*",
201 | "http://www.google.co.tz/*",
202 | "http://www.google.com.ua/*",
203 | "http://www.google.co.ug/*",
204 | "http://www.google.co.uk/*",
205 | "http://www.google.com.uy/*",
206 | "http://www.google.co.uz/*",
207 | "http://www.google.com.vc/*",
208 | "http://www.google.co.ve/*",
209 | "http://www.google.vg/*",
210 | "http://www.google.co.vi/*",
211 | "http://www.google.com.vn/*",
212 | "http://www.google.vu/*",
213 | "http://www.google.ws/*",
214 | "http://www.google.rs/*",
215 | "http://www.google.co.za/*",
216 | "http://www.google.co.zm/*",
217 | "http://www.google.co.zw/*",
218 | "http://www.google.cat/*",
219 | "https://www.google.com/*",
220 | "https://www.google.ad/*",
221 | "https://www.google.ae/*",
222 | "https://www.google.com.af/*",
223 | "https://www.google.com.ag/*",
224 | "https://www.google.com.ai/*",
225 | "https://www.google.am/*",
226 | "https://www.google.co.ao/*",
227 | "https://www.google.com.ar/*",
228 | "https://www.google.as/*",
229 | "https://www.google.at/*",
230 | "https://www.google.com.au/*",
231 | "https://www.google.az/*",
232 | "https://www.google.ba/*",
233 | "https://www.google.com.bd/*",
234 | "https://www.google.be/*",
235 | "https://www.google.bf/*",
236 | "https://www.google.bg/*",
237 | "https://www.google.com.bh/*",
238 | "https://www.google.bi/*",
239 | "https://www.google.bj/*",
240 | "https://www.google.com.bn/*",
241 | "https://www.google.com.bo/*",
242 | "https://www.google.com.br/*",
243 | "https://www.google.bs/*",
244 | "https://www.google.co.bw/*",
245 | "https://www.google.by/*",
246 | "https://www.google.com.bz/*",
247 | "https://www.google.ca/*",
248 | "https://www.google.cd/*",
249 | "https://www.google.cf/*",
250 | "https://www.google.cg/*",
251 | "https://www.google.ch/*",
252 | "https://www.google.ci/*",
253 | "https://www.google.co.ck/*",
254 | "https://www.google.cl/*",
255 | "https://www.google.cm/*",
256 | "https://www.google.cn/*",
257 | "https://www.google.com.co/*",
258 | "https://www.google.co.cr/*",
259 | "https://www.google.com.cu/*",
260 | "https://www.google.cv/*",
261 | "https://www.google.cz/*",
262 | "https://www.google.de/*",
263 | "https://www.google.dj/*",
264 | "https://www.google.dk/*",
265 | "https://www.google.dm/*",
266 | "https://www.google.com.do/*",
267 | "https://www.google.dz/*",
268 | "https://www.google.com.ec/*",
269 | "https://www.google.ee/*",
270 | "https://www.google.com.eg/*",
271 | "https://www.google.es/*",
272 | "https://www.google.com.et/*",
273 | "https://www.google.fi/*",
274 | "https://www.google.com.fj/*",
275 | "https://www.google.fm/*",
276 | "https://www.google.fr/*",
277 | "https://www.google.ga/*",
278 | "https://www.google.ge/*",
279 | "https://www.google.gg/*",
280 | "https://www.google.com.gh/*",
281 | "https://www.google.com.gi/*",
282 | "https://www.google.gl/*",
283 | "https://www.google.gm/*",
284 | "https://www.google.gp/*",
285 | "https://www.google.gr/*",
286 | "https://www.google.com.gt/*",
287 | "https://www.google.gy/*",
288 | "https://www.google.com.hk/*",
289 | "https://www.google.hn/*",
290 | "https://www.google.hr/*",
291 | "https://www.google.ht/*",
292 | "https://www.google.hu/*",
293 | "https://www.google.co.id/*",
294 | "https://www.google.ie/*",
295 | "https://www.google.co.il/*",
296 | "https://www.google.im/*",
297 | "https://www.google.co.in/*",
298 | "https://www.google.iq/*",
299 | "https://www.google.is/*",
300 | "https://www.google.it/*",
301 | "https://www.google.je/*",
302 | "https://www.google.com.jm/*",
303 | "https://www.google.jo/*",
304 | "https://www.google.co.jp/*",
305 | "https://www.google.co.ke/*",
306 | "https://www.google.com.kh/*",
307 | "https://www.google.ki/*",
308 | "https://www.google.kg/*",
309 | "https://www.google.co.kr/*",
310 | "https://www.google.com.kw/*",
311 | "https://www.google.kz/*",
312 | "https://www.google.la/*",
313 | "https://www.google.com.lb/*",
314 | "https://www.google.li/*",
315 | "https://www.google.lk/*",
316 | "https://www.google.co.ls/*",
317 | "https://www.google.lt/*",
318 | "https://www.google.lu/*",
319 | "https://www.google.lv/*",
320 | "https://www.google.com.ly/*",
321 | "https://www.google.co.ma/*",
322 | "https://www.google.md/*",
323 | "https://www.google.me/*",
324 | "https://www.google.mg/*",
325 | "https://www.google.mk/*",
326 | "https://www.google.ml/*",
327 | "https://www.google.mn/*",
328 | "https://www.google.ms/*",
329 | "https://www.google.com.mt/*",
330 | "https://www.google.mu/*",
331 | "https://www.google.mv/*",
332 | "https://www.google.mw/*",
333 | "https://www.google.com.mx/*",
334 | "https://www.google.com.my/*",
335 | "https://www.google.co.mz/*",
336 | "https://www.google.com.na/*",
337 | "https://www.google.com.nf/*",
338 | "https://www.google.com.ng/*",
339 | "https://www.google.com.ni/*",
340 | "https://www.google.ne/*",
341 | "https://www.google.nl/*",
342 | "https://www.google.no/*",
343 | "https://www.google.com.np/*",
344 | "https://www.google.nr/*",
345 | "https://www.google.nu/*",
346 | "https://www.google.co.nz/*",
347 | "https://www.google.com.om/*",
348 | "https://www.google.com.pa/*",
349 | "https://www.google.com.pe/*",
350 | "https://www.google.com.ph/*",
351 | "https://www.google.com.pk/*",
352 | "https://www.google.pl/*",
353 | "https://www.google.pn/*",
354 | "https://www.google.com.pr/*",
355 | "https://www.google.ps/*",
356 | "https://www.google.pt/*",
357 | "https://www.google.com.py/*",
358 | "https://www.google.com.qa/*",
359 | "https://www.google.ro/*",
360 | "https://www.google.ru/*",
361 | "https://www.google.rw/*",
362 | "https://www.google.com.sa/*",
363 | "https://www.google.com.sb/*",
364 | "https://www.google.sc/*",
365 | "https://www.google.se/*",
366 | "https://www.google.com.sg/*",
367 | "https://www.google.sh/*",
368 | "https://www.google.si/*",
369 | "https://www.google.sk/*",
370 | "https://www.google.com.sl/*",
371 | "https://www.google.sn/*",
372 | "https://www.google.so/*",
373 | "https://www.google.sm/*",
374 | "https://www.google.st/*",
375 | "https://www.google.com.sv/*",
376 | "https://www.google.td/*",
377 | "https://www.google.tg/*",
378 | "https://www.google.co.th/*",
379 | "https://www.google.com.tj/*",
380 | "https://www.google.tk/*",
381 | "https://www.google.tl/*",
382 | "https://www.google.tm/*",
383 | "https://www.google.tn/*",
384 | "https://www.google.to/*",
385 | "https://www.google.com.tr/*",
386 | "https://www.google.tt/*",
387 | "https://www.google.com.tw/*",
388 | "https://www.google.co.tz/*",
389 | "https://www.google.com.ua/*",
390 | "https://www.google.co.ug/*",
391 | "https://www.google.co.uk/*",
392 | "https://www.google.com.uy/*",
393 | "https://www.google.co.uz/*",
394 | "https://www.google.com.vc/*",
395 | "https://www.google.co.ve/*",
396 | "https://www.google.vg/*",
397 | "https://www.google.co.vi/*",
398 | "https://www.google.com.vn/*",
399 | "https://www.google.vu/*",
400 | "https://www.google.ws/*",
401 | "https://www.google.rs/*",
402 | "https://www.google.co.za/*",
403 | "https://www.google.co.zm/*",
404 | "https://www.google.co.zw/*",
405 | "https://www.google.cat/*",
406 | "https://encrypted.google.com/*"
407 | ],
408 | "js": [
409 | "js/jquery.js",
410 | "js/common.js",
411 | "js/google.js"
412 | ],
413 | "css": [
414 | "css/common.css",
415 | "css/google.css"
416 | ]
417 | },
418 | {
419 | "matches": [
420 | "http://www.bing.com/search*",
421 | "https://www.bing.com/search*"
422 | ],
423 | "js": [
424 | "js/jquery.js",
425 | "js/common.js",
426 | "js/bing.js"
427 | ],
428 | "css": [
429 | "css/common.css",
430 | "css/bing.css"
431 | ]
432 | }
433 | ],
434 | "options_page": "html/options.html",
435 | "background": {
436 | "scripts": ["js/background.js"]
437 | },
438 | "permissions": [
439 | "https://chrome.duckduckgo.com/*",
440 | "https://duckduckgo.com/*",
441 | "contextMenus"
442 | ]
443 | }
444 |
--------------------------------------------------------------------------------
/html/popup.html:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 | DuckDuckGo
20 |
322 |
323 |
324 |
325 |
330 |
331 |
332 |

333 |
334 |
335 |
336 |
337 |
SPECIAL
338 |
361 |
362 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |