Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

import from Chrome

  • Loading branch information...
commit 49a27d02d0658a28104630f75be5c8ab79476409 1 parent 35a7697
@mrshu mrshu authored
View
202 LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
View
30 Makefile
@@ -1,7 +1,29 @@
-EXTNAME := opera-zeroclick
+EXTNAME := chrome-zeroclick
+KEYFILE := $(EXTNAME).pem
+SHELL := /usr/bin/env bash
+CHROME := chromium -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)
+ITEMS := css/ html/ img/ js/ manifest.json
+all: pack
-oex:
- zip -r ${EXTNAME}.oex . -x build/\* -x .git/\*
- mv opera-zeroclick.oex build/
+moveout: $(ITEMS)
+ mkdir $(TMPDIR)/$(EXTNAME)
+ cp -R $(ITEMS) $(TMPDIR)/$(EXTNAME)
+crx: moveout
+ $(CHROME) --pack-extension=$(TMPDIR)/$(EXTNAME) \
+ --pack-extension-key=$(KEYFILE) --no-message-box
+ mv $(TMPDIR)/$(EXTNAME).crx $(CWD)/build/$(EXTNAME)-latest.crx
+
+zip: moveout
+ cd $(TMPDIR)/$(EXTNAME)/ && zip $(EXTNAME)-$(VERSION).zip -r ./*
+ cp $(TMPDIR)/$(EXTNAME)/$(EXTNAME)-$(VERSION).zip $(CWD)
+
+build: zip
+ mv $(CWD)/$(EXTNAME)-$(VERSION).zip ~/dropbox/Dropbox/DuckDuckGo\ Assets/Extensions/Chrome/
+
+clean:
+ rm $(CWD)/*.zip
View
BIN  build/opera-zeroclick.oex
Binary file not shown
View
13 config.xml
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<widget xmlns="http://www.w3.org/ns/widgets" id="http://www.example.org/helloworld" version="1.2.2">
- <name>DuckDuckGo for Opera</name>
- <description>DuckDuckGo enhancements for Opera.</description>
- <author href="https://duckduckgo.com" email="support@duckduckgo.com">DuckDuckGo</author>
- <access origin="https://api.duckduckgo.com" />
- <icon src="img/icon_128.png"/>
- <preference name="dev" value="false" />
- <preference name="meanings" value="true" />
- <preference name="zeroclickinfo" value="true" />
- <preference name="popup" value="true" />
- <preference name="remember_last_search" value="true" />
-</widget>
View
267 css/bing.css
@@ -14,288 +14,53 @@
* limitations under the License.
*/
-#ddg_zeroclick {
- background: none repeat scroll 0 0 #fafafa;
- border: 1px solid #dedede;
- border-radius: 2px;
- display: block;
- margin-bottom: 20px;
- width: 517px;
- z-index: 10;
+#ddg_zeroclick.bing {
+ width: 517px;
}
-.ddg_zeroclick_icon {
- display: inline;
- float: left;
- padding-left: 8px;
- padding-right: 10px;
- padding-top: 4px;
-}
-
-.ddg_answer {
- background: url(https://duckduckgo.com/icon16.png) 4px 4px no-repeat #F9F9F9 !important;
- line-height: 1.4;
- padding: 4px 0px 4px 30px !important;
- margin-bottom: 12px;
-}
-
-
-#ddg_zeroclick_header {
- padding: 4px;
- font-weight: bold;
- /*background: -webkit-gradient(linear, left top, left bottom, from(#e16036), to(#d64a2d));
- border-bottom: 1px solid #a1260d;
- border-left: 1px solid #a73010;
- border-right: 1px solid #a73010;
- border-top: 1px solid #c25322;
- */
-
- background: -webkit-gradient(linear, left top, left bottom, from(#da5b4a), to(#c9392c));
- background: -moz-linear-gradient(to bottom, #da5b4a, #c9392c);
- background: -o-linear-gradient(#da5b4a, #c9392c);
-
- border: 1px solid #c23d2a;
- margin: -1px;
- border-top-left-radius: 2px;
- border-top-right-radius: 2px;
-
-
- font-family: "Helvetica Neue", sans-serif;
-}
-
-#ddg_zeroclick_header img {
- margin-top: -4px;
- float: right;
-}
-
-#ddg_zeroclick_header a, #ddg_zeroclick_header a:active {
- color: #fff !important;
-}
-
-#ddg_zeroclick_image {
- margin: 10px;
- float: right;
-}
-
-#ddg_zeroclick_image img {
- padding: 1px;
- border-radius: 2px;
-}
-
-.ddg_zeroclick_img {
- max-width: 100px;
- max-height: 100px;
-}
-
-#ddg_zeroclick_abstract {
- margin: 5px 7px 5px 10px;
- word-wrap: break-word;
- font-size: 13px;
- color: #505050;
-}
-
-#ddg_zeroclick_abstract > div{
- padding-left: 2px;
-}
-
-#ddg_zeroclick_abstract p {
- line-height: 16px;
- font-family: "Helvetica Neue", sans-serif;
- color: #202020;
- padding: 5px 0;
- margin: 0;
-}
-
-#ddg_zeroclick_abstract a{
- text-decoration: none;
- color: #0033cc;
-}
-
-#ddg_zeroclick_abstract a:hover {
- text-decoration: underline;
-}
-
-.first_category {
- /*margin-top: 3px !important;*/
-}
-
-#ddg_zeroclick_official_links {
+.bing #ddg_zeroclick_official_links {
padding: 5px 0px 5px 1px;
}
-#ddg_zeroclick_official_links img{
- display: inline;
- float: left;
- padding-right: 5px;
- width: 16px;
- height: 16px;
+.bing #ddg_zeroclick_official_links img {
margin-top: -1px;
}
-
-
-#ddg_zeroclick_header a {
- text-decoration: none;
- color: #fff;
-}
-
-#ddg_zeroclick_header a:hover {
- text-decoration: underline;
-}
-
-.ddg_zeroclick_category{
- /* background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQQAKCgoJiYmIaGho6OjqSkpHt7e35+fq6urqurq4KCgoqKipycnJOTk3h4eLCwsKioqP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAQABAAAAVYICQ6ZGmWInSkLLu2cIo8dG3X4kPE7A4RAF4qCAEsRIuk8ghhLgJCERQSYIgY2KwVsmUMopBvWCFSmM9kSFohALchgoQoQaez5HQDWC8qgP0iDYKDhIMpIQA7"); */
- background-image: url(https://duckduckgo.com/assets/icon_category.v101.png);
- background-repeat: no-repeat;
+.bing .ddg_zeroclick_category {
background-position: 2px 2px;
- line-height: 22px;
- padding: 0px 0px 0px 26px !important;
border: 1px solid #fafafa;
}
-
-.ddg_zeroclick_article{
- /* background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQQAKCgoJiYmIaGho6OjqSkpHt7e35+fq6urqurq4KCgoqKipycnJOTk3h4eLCwsKioqP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAQABAAAAVYICQ6ZGmWInSkLLu2cIo8dG3X4kPE7A4RAF4qCAEsRIuk8ghhLgJCERQSYIgY2KwVsmUMopBvWCFSmM9kSFohALchgoQoQaez5HQDWC8qgP0iDYKDhIMpIQA7"); */
- background-image: url(https://duckduckgo.com/assets/icon_article.v101.png);
- background-repeat: no-repeat;
+.bing .ddg_zeroclick_category {
background-position: 2px 2px;
- line-height: 22px;
padding: 0px 0px 0px 26px !important;
- border: 1px solid #fafafa;
}
-.ddg_zeroclick_more{
- background-image: url(https://duckduckgo.com/assets/icon_ellipsis.v101.png);
+.bing .ddg_zeroclick_article {
background-position: 2px 2px;
- background-repeat: no-repeat;
- line-height: 22px;
padding: 0px 0px 0px 26px !important;
- border: 1px solid #fafafa;
- cursor: pointer;
-}
-
-
-.ddg_zeroclick_disambig {
- line-height: 1.4;
- padding: 4px;
- margin-left: 48px;
- border: 1px solid #fafafa;
-}
-
-.icon_disambig {
- padding-top: 5px;
- float: left;
- text-align: right;
- width: 48px;
- display: block;
-}
-
-.icon_disambig img {
- max-height: 40px;
- max-width: 40px;
- display: inline;
- margin-top: 2px;
- padding-right: 4px;
-}
-
-.icon_category {
- text-align: right;
- width: 58px;
- max-height: 50px;
- float: left;
- padding: 5px 0px 2px 2px;
}
-.icon_category img {
- max-height: 50px;
- max-width: 50px;
-}
-
-.ddg_zeroclick_category_item {
- line-height: 1.4;
- padding: 4px;
- min-height: 30px;
- margin-left: 62px;
- width: 430px !important;
-}
-
-.ddg_zeroclick_category_item a {
- font-size: 1.2em;
-}
-
-.disambig_holder {
- margin: 3px;
-}
-
-.disambig_more {
- border: 1px solid #fafafa;
- margin-left: 52px !important;
- padding: 4px;
- clear: left;
- width: 474px;
-}
-
-.disambig_more a {
- cursor: pointer;
-}
-
-.disambig_more hr {
- width: 85%;
- height: 1px;
- margin: 0;
- padding: 0;
- border: none;
- color: #BADE89;
- background-color: #D2D2D2;
- text-align: left;
-}
-
-.ddg_selected{
- background-color: #efefef !important;
- border-radius: 2px;
- border: 1px solid #c2c2c2 !important;
+.bing .ddg_zeroclick_more {
+ background-position: 2px 2px;
+ padding: 0px 0px 0px 26px !important;
cursor: pointer;
}
-.category_more {
- padding: 4px 4px 4px 68px !important;
- width: 460px;
+.bing .ddg_zeroclick_category_item {
+ width: 470px;
}
-
-#ddg_zeroclick_category_img {
- max-height: 30px;
- max-width: 30px;
+.bing .disambig_more {
+ width: 434px;
}
-.wrapper {
- clear: left;
- padding-bottom: 3px;
+.bing .wrapper {
width: 490px !important;
- border: 1px solid #fafafa;
}
-.ddg_more {
- font-size: 12px;
- float: right;
- font-weight: normal;
- line-height: 24px;
-}
-
-.ddg_more_link {
+.bing .ddg_more_link {
padding-left: 2px;
}
-.ddg_head {
- font-size: 18px;
- line-height: 24px;
- padding-left: 5px;
- text-shadow: 0px -1px 0px #7d320d;
-}
-.clear {
- clear: both;
- height: 0;
- font-size: 0;
- line-height: 0;
-}
View
284 css/common.css
@@ -0,0 +1,284 @@
+/*
+ * Copyright (C) 2012 DuckDuckGo, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ddg_zeroclick {
+ background: none repeat scroll 0 0 #fafafa;
+ border: 1px solid #dedede;
+ border-radius: 2px;
+ display: block;
+ margin-bottom: 20px;
+ width: 554px;
+ z-index: 10;
+}
+
+.ddg_zeroclick_icon {
+ display: inline;
+ float: left;
+ padding-left: 8px;
+ padding-right: 10px;
+ padding-top: 4px;
+}
+
+.ddg_answer {
+ background: url(https://duckduckgo.com/icon16.png) 4px 4px no-repeat #F9F9F9 !important;
+ line-height: 1.4;
+ padding: 4px 0px 4px 30px !important;
+ margin-bottom: 12px;
+}
+
+
+#ddg_zeroclick_header {
+ padding: 4px;
+ font-weight: bold;
+ /*background: -webkit-gradient(linear, left top, left bottom, from(#e16036), to(#d64a2d));
+ border-bottom: 1px solid #a1260d;
+ border-left: 1px solid #a73010;
+ border-right: 1px solid #a73010;
+ border-top: 1px solid #c25322;
+ */
+
+ background: -webkit-gradient(linear, left top, left bottom, from(#da5b4a), to(#c9392c));
+ background: -moz-linear-gradient(to bottom, #da5b4a, #c9392c);
+ background: -o-linear-gradient(#da5b4a, #c9392c);
+
+ border: 1px solid #c23d2a;
+ margin: -1px;
+ border-top-left-radius: 2px;
+ border-top-right-radius: 2px;
+
+
+ font-family: "Helvetica Neue", sans-serif;
+}
+
+#ddg_zeroclick_header img {
+ margin-top: -4px;
+ float: right;
+}
+
+#ddg_zeroclick_header a, #ddg_zeroclick_header a:active {
+ color: #fff !important;
+}
+
+
+#ddg_zeroclick_image {
+ margin: 10px;
+ float: right;
+}
+
+#ddg_zeroclick_image img {
+ padding: 1px;
+ border-radius: 2px;
+}
+
+.ddg_zeroclick_img {
+ max-width: 100px;
+ max-height: 100px;
+}
+
+#ddg_zeroclick_abstract {
+ margin: 5px 7px 5px 10px;
+ word-wrap: break-word;
+ font-size: 13px;
+ color: #505050;
+}
+
+#ddg_zeroclick_abstract > div{
+ padding-left: 2px;
+}
+
+#ddg_zeroclick_abstract p {
+ line-height: 16px;
+ font-family: "Helvetica Neue", sans-serif;
+ color: #202020;
+ padding: 5px 0;
+ margin: 0;
+}
+
+#ddg_zeroclick_abstract a{
+ text-decoration: none;
+ color: #0033cc;
+}
+
+#ddg_zeroclick_abstract a:hover {
+ text-decoration: underline;
+}
+
+.first_category {
+}
+
+#ddg_zeroclick_official_links {
+}
+
+#ddg_zeroclick_official_links img{
+ display: inline;
+ float: left;
+ padding-right: 5px;
+ width: 16px;
+ height: 16px;
+}
+
+#ddg_zeroclick_header a {
+ text-decoration: none;
+ color: #fff;
+}
+
+#ddg_zeroclick_header a:hover {
+ text-decoration: underline;
+}
+
+.ddg_zeroclick_category{
+ /* background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQQAKCgoJiYmIaGho6OjqSkpHt7e35+fq6urqurq4KCgoqKipycnJOTk3h4eLCwsKioqP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAQABAAAAVYICQ6ZGmWInSkLLu2cIo8dG3X4kPE7A4RAF4qCAEsRIuk8ghhLgJCERQSYIgY2KwVsmUMopBvWCFSmM9kSFohALchgoQoQaez5HQDWC8qgP0iDYKDhIMpIQA7"); */
+ background-image: url(https://duckduckgo.com/assets/icon_category.v101.png);
+ background-repeat: no-repeat;
+ line-height: 22px;
+ border: 1px solid #fafafa;
+}
+
+
+.ddg_zeroclick_article{
+ /* background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQQAKCgoJiYmIaGho6OjqSkpHt7e35+fq6urqurq4KCgoqKipycnJOTk3h4eLCwsKioqP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAQABAAAAVYICQ6ZGmWInSkLLu2cIo8dG3X4kPE7A4RAF4qCAEsRIuk8ghhLgJCERQSYIgY2KwVsmUMopBvWCFSmM9kSFohALchgoQoQaez5HQDWC8qgP0iDYKDhIMpIQA7"); */
+ background-image: url(https://duckduckgo.com/assets/icon_article.v101.png);
+ background-repeat: no-repeat;
+ line-height: 22px;
+ border: 1px solid #fafafa;
+}
+
+.ddg_zeroclick_more{
+ background-image: url(https://duckduckgo.com/assets/icon_ellipsis.v101.png);
+ background-repeat: no-repeat;
+ line-height: 22px;
+ border: 1px solid #fafafa;
+}
+
+.ddg_zeroclick_disambig {
+ line-height: 1.4;
+ padding: 4px;
+ margin-left: 48px;
+ border: 1px solid #fafafa;
+}
+
+#ddg_zeroclick .icon_disambig {
+ padding-top: 5px;
+ float: left;
+ text-align: right;
+ width: 48px;
+ display: block;
+}
+
+#ddg_zeroclick .icon_disambig img {
+ max-height: 40px;
+ max-width: 40px;
+ display: inline;
+ margin-top: 2px;
+ padding-right: 4px;
+}
+
+#ddg_zeroclick .icon_category {
+ text-align: right;
+ width: 58px;
+ max-height: 50px;
+ float: left;
+ padding: 5px 0px 2px 2px;
+}
+
+#ddg_zeroclick .icon_category img {
+ max-height: 50px;
+ max-width: 50px;
+}
+
+#ddg_zeroclick .ddg_zeroclick_category_item {
+ line-height: 1.4;
+ padding: 4px;
+ min-height: 30px;
+ margin-left: 62px;
+}
+
+#ddg_zeroclick .ddg_zeroclick_category_item a {
+ font-size: 1.2em;
+}
+
+#ddg_zeroclick .disambig_holder {
+ margin: 3px;
+}
+
+#ddg_zeroclick .disambig_more {
+ border: 1px solid #fafafa;
+ margin-left: 52px !important;
+ padding: 4px;
+ clear: left;
+}
+
+#ddg_zeroclick .disambig_more hr {
+ width: 85%;
+ height: 1px;
+ margin: 0;
+ padding: 0;
+ border: none;
+ color: #BADE89;
+ background-color: #D2D2D2;
+ text-align: left;
+}
+
+#ddg_zeroclick .ddg_selected{
+ background-color: #efefef !important;
+ border-radius: 2px;
+ border: 1px solid #c2c2c2 !important;
+ cursor: pointer;
+}
+
+#ddg_zeroclick .category_more {
+ padding: 4px 4px 4px 68px !important;
+ width: 460px;
+}
+
+
+#ddg_zeroclick .ddg_zeroclick_category_img {
+ max-height: 30px;
+ max-width: 30px;
+}
+
+
+#ddg_zeroclick .wrapper {
+ clear: left;
+ padding-bottom: 3px;
+ border: 1px solid #fafafa;
+}
+
+#ddg_zeroclick .ddg_more {
+ font-size: 12px;
+ float: right;
+ font-weight: normal;
+ line-height: 24px;
+}
+
+#ddg_zeroclick .ddg_more_link {
+ padding-left: 12px;
+}
+
+#ddg_zeroclick .ddg_head {
+ font-size: 18px;
+ line-height: 24px;
+ padding-left: 5px;
+ text-shadow: 0px -1px 0px #7d320d;
+}
+
+#ddg_zeroclick .clear {
+ clear: both;
+ height: 0;
+ font-size: 0;
+ line-height: 0;
+}
+
View
258 css/google.css
@@ -14,285 +14,59 @@
* limitations under the License.
*/
-#ddg_zeroclick {
- background: none repeat scroll 0 0 #fafafa;
- border: 1px solid #dedede;
- border-radius: 2px;
- display: block;
- margin-bottom: 20px;
- width: 554px;
- z-index: 10;
+.google #ddg_zeroclick{
+ width: 554px;
}
-.ddg_zeroclick_icon {
- display: inline;
- float: left;
- padding-left: 8px;
- padding-right: 10px;
- padding-top: 4px;
-}
-
-.ddg_answer {
- background: url(https://duckduckgo.com/icon16.png) 4px 4px no-repeat #F9F9F9 !important;
- line-height: 1.4;
- padding: 4px 0px 4px 30px !important;
- margin-bottom: 12px;
-}
-
-
-#ddg_zeroclick_header {
- padding: 4px;
- font-weight: bold;
- /*background: -webkit-gradient(linear, left top, left bottom, from(#e16036), to(#d64a2d));
- border-bottom: 1px solid #a1260d;
- border-left: 1px solid #a73010;
- border-right: 1px solid #a73010;
- border-top: 1px solid #c25322;
- */
-
- background: -webkit-gradient(linear, left top, left bottom, from(#da5b4a), to(#c9392c));
- background: -moz-linear-gradient(to bottom, #da5b4a, #c9392c);
- background: -o-linear-gradient(#da5b4a, #c9392c);
-
- border: 1px solid #c23d2a;
- margin: -1px;
- border-top-left-radius: 2px;
- border-top-right-radius: 2px;
-
-
- font-family: "Helvetica Neue", sans-serif;
-}
-
-#ddg_zeroclick_header img {
- margin-top: -4px;
- float: right;
-}
-
-#ddg_zeroclick_header a, #ddg_zeroclick_header a:active {
- color: #fff !important;
-}
-
-
-#ddg_zeroclick_image {
- margin: 10px;
- float: right;
-}
-
-#ddg_zeroclick_image img {
- padding: 1px;
- border-radius: 2px;
-}
-
-.ddg_zeroclick_img {
- max-width: 100px;
- max-height: 100px;
-}
-
-#ddg_zeroclick_abstract {
- margin: 5px 7px 5px 10px;
- word-wrap: break-word;
- font-size: 13px;
- color: #505050;
-}
-
-#ddg_zeroclick_abstract > div{
+.google #ddg_zeroclick_abstract > div{
border: 1px solid #fafafa;
padding-left: 2px;
}
-#ddg_zeroclick_abstract p {
- line-height: 16px;
- font-family: "Helvetica Neue", sans-serif;
- color: #202020;
- padding: 5px 0;
- margin: 0;
-}
-
-#ddg_zeroclick_abstract a{
- text-decoration: none;
- color: #0033cc;
-}
-
-#ddg_zeroclick_abstract a:hover {
- text-decoration: underline;
-}
-
-.first_category {
+.google .first_category {
margin-top: 3px !important;
}
-#ddg_zeroclick_official_links {
+.google #ddg_zeroclick_official_links {
padding: 5px 0px 5px 0px;
}
-#ddg_zeroclick_official_links img{
- display: inline;
- float: left;
- padding-right: 5px;
- width: 16px;
- height: 16px;
+.google #ddg_zeroclick_official_links img {
margin-top: -2px;
}
-
-
-#ddg_zeroclick_header a {
- text-decoration: none;
- color: #fff;
-}
-
-#ddg_zeroclick_header a:hover {
- text-decoration: underline;
-}
-
-.ddg_zeroclick_category{
- /* background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQQAKCgoJiYmIaGho6OjqSkpHt7e35+fq6urqurq4KCgoqKipycnJOTk3h4eLCwsKioqP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAQABAAAAVYICQ6ZGmWInSkLLu2cIo8dG3X4kPE7A4RAF4qCAEsRIuk8ghhLgJCERQSYIgY2KwVsmUMopBvWCFSmM9kSFohALchgoQoQaez5HQDWC8qgP0iDYKDhIMpIQA7"); */
- background-image: url(https://duckduckgo.com/assets/icon_category.v101.png);
- background-repeat: no-repeat;
+.google .ddg_zeroclick_category {
background-position: 2px 4px;
- line-height: 22px;
padding: 1px 0px 1px 36px !important;
- border: 1px solid #fafafa;
}
-
-.ddg_zeroclick_article{
- /* background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQQAKCgoJiYmIaGho6OjqSkpHt7e35+fq6urqurq4KCgoqKipycnJOTk3h4eLCwsKioqP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABAALAAAAAAQABAAAAVYICQ6ZGmWInSkLLu2cIo8dG3X4kPE7A4RAF4qCAEsRIuk8ghhLgJCERQSYIgY2KwVsmUMopBvWCFSmM9kSFohALchgoQoQaez5HQDWC8qgP0iDYKDhIMpIQA7"); */
- background-image: url(https://duckduckgo.com/assets/icon_article.v101.png);
- background-repeat: no-repeat;
+.google .ddg_zeroclick_article {
background-position: 2px 4px;
- line-height: 22px;
padding: 1px 0px 1px 36px !important;
- border: 1px solid #fafafa;
}
-.ddg_zeroclick_more{
- background-image: url(https://duckduckgo.com/assets/icon_ellipsis.v101.png);
+.google .ddg_zeroclick_more {
background-position: 2px 4px;
- background-repeat: no-repeat;
- line-height: 22px;
padding: 1px 0px 1px 36px !important;
- border: 1px solid #fafafa;
-}
-
-.ddg_zeroclick_disambig {
- line-height: 1.4;
- padding: 4px;
- margin-left: 48px;
- border: 1px solid #fafafa;
-}
-
-.icon_disambig {
- padding-top: 5px;
- float: left;
- text-align: right;
- width: 48px;
- display: block;
-}
-
-.icon_disambig img {
- max-height: 40px;
- max-width: 40px;
- display: inline;
- margin-top: 2px;
- padding-right: 4px;
-}
-
-.icon_category {
- text-align: right;
- width: 58px;
- max-height: 50px;
- float: left;
- padding: 5px 0px 2px 2px;
-}
-
-.icon_category img {
- max-height: 50px;
- max-width: 50px;
-}
-
-.ddg_zeroclick_category_item {
- line-height: 1.4;
- padding: 4px;
- min-height: 30px;
- margin-left: 62px;
- width: 470px;
}
-.ddg_zeroclick_category_item a {
- font-size: 1.2em;
+.google .ddg_zeroclick_category_item {
+ width: 430px !important;
}
-.disambig_holder {
- margin: 3px;
-}
-
-.disambig_more {
- border: 1px solid #fafafa;
- margin-left: 52px !important;
- padding: 4px;
- clear: left;
+.google .disambig_more {
width: 474px;
}
-.disambig_more hr {
- width: 85%;
- height: 1px;
- margin: 0;
- padding: 0;
- border: none;
- color: #BADE89;
- background-color: #D2D2D2;
- text-align: left;
-}
-
-.ddg_selected{
- background-color: #efefef !important;
- border-radius: 2px;
- border: 1px solid #c2c2c2 !important;
- cursor: pointer;
-}
-
-.category_more {
- padding: 4px 4px 4px 68px !important;
- width: 460px;
-}
-
-
-#ddg_zeroclick_category_img {
- max-height: 30px;
- max-width: 30px;
-}
-
-
-.wrapper {
- clear: left;
- padding-bottom: 3px;
+.google .wrapper {
width: 530px;
- border: 1px solid #fafafa;
-}
-
-.ddg_more {
- font-size: 12px;
- float: right;
- font-weight: normal;
- line-height: 24px;
}
-.ddg_more_link {
+.google .ddg_more_link {
padding-left: 12px;
}
-.ddg_head {
- font-size: 18px;
- line-height: 24px;
- padding-left: 5px;
- text-shadow: 0px -1px 0px #7d320d;
+.google .disambig_more a {
+ cursor: pointer;
}
-.clear {
- clear: both;
- height: 0;
- font-size: 0;
- line-height: 0;
-}
View
27 html/background.html
@@ -0,0 +1,27 @@
+<!--
+ Copyright (C) 2012 DuckDuckGo, Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="../js/background.js"></script>
+ <script type="text/javascript">
+ var background = new Background();
+ </script>
+ </head>
+ <body>
+ </body>
+</html>
View
41 html/options.html
@@ -0,0 +1,41 @@
+<!--
+ Copyright (C) 2012 DuckDuckGo, Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<!DOCTYPE html>
+<html>
+<head><title>DuckDuckGo for Chrome - Options</title></head>
+<script type="text/javascript" src="../js/options.js"></script>
+
+<body>
+
+ Developer mode:
+ <input type="checkbox" id="dev" ></input>
+<br>
+ Meanings:
+ <input type="checkbox" id="meanings" checked="yes"></input>
+<br>
+ Instant answers on Google/Bing
+ <input type="checkbox" id="zeroclickinfo" checked="yes"></input>
+<br>
+ Remember last search in the popup
+ <input type="checkbox" id="lastsearch_enabled" checked="yes"></input>
+<br>
+
+
+<button>Save</button>
+ <div id="status"> </div>
+</body>
+</html>
View
323 html/popup.html
@@ -15,16 +15,17 @@
-->
<!DOCTYPE html>
+<html>
<head>
<title>DuckDuckGo</title>
+<link rel="stylesheet" href="http://duckduckgo.com/s427.css" type="text/css">
+<script type="text/javascript" src="../js/popup.js"></script>
<style type="text/css">
-.invisible{visibility:hidden;}.k_float{z-index:9999999;position:fixed!important;position:absolute;}.k_bottom{bottom:0;}.k_right{right:2px;}.k_left{left:0;}.k_top{top:0;_top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? document.documentElement.scrollTop:document.body.scrollTop);}html{color:#000;background:#fff;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,select,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,button,caption,cite,code,dfn,em,input,optgroup,option,select,strong,textarea,th,var{font:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,textarea,button{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}html{height:101%;background:#fdfdfd;color:#333;overflow-y:scroll;overflow-x:hidden;}body{font-size:105%;}input,body,a,select,#special_page_header,#zero_click_header,#did_you_mean,#search_form_input,#bang{font-family:"Helvetica Neue","Segoe UI",Arial,sans-serif;}a{text-decoration:none;color:#1168cc;}a:visited{color:#6830bb;}a:hover,a:focus{text-decoration:underline;}a:focus{outline:none;}a.large{font-size:128.6%;}h1,h2,h3,h4,h5,h6{display:inline;}h1{font-weight:bold;}h2{font-weight:normal;}img{display:block;-ms-interpolation-mode:bicubic;}ul{padding-left:30px;padding-top:3px;}ul li{list-style:disc outside;}ol{padding-left:37px;padding-top:3px;}ol li{list-style:decimal outside;}sup,sub{height:0;line-height:1;vertical-align:baseline;_vertical-align:bottom;position:relative;font-size:71.4%;}sup{bottom:1ex;}sub{top:.5ex;}#search_form_input_homepage,#search_form_input,#search_wrapper,#search_wrapper_homepage{-moz-background-clip:padding;-webkit-background-clip:padding-box;-webkit-background-clip:padding;-moz-background-clip:padding;background-clip:padding-box;}#content_wrapper,#header_content_wrapper{max-width:1027px;min-width:647px;}#special_page_header,#zero_click_header{*zoom:1;color:#444;background:#e9e9e9 url("assets/zero_click_header_bg.v101.png") repeat-x;border-top-radius:6px;font-size:107.1%;border-bottom:1px solid #d1d1d1;padding:5px;padding-left:15px;-moz-border-radius-topright:6px;-moz-border-radius-topleft:6px;-webkit-border-top-right-radius:6px;-webkit-border-top-left-radius:6px;border-top-right-radius:6px;border-top-left-radius:6px;font-weight:bold;}#special_page_header:before,#zero_click_header:before,#special_page_header:after,#zero_click_header:after{content:"";display:table;}#special_page_header:after,#zero_click_header:after{clear:both;}#special_page_header,#zero_click_header h1 a,#special_page_header h1 a{color:#434343;font-weight:bold;}#did_you_mean{padding-bottom:15px;}#bang_wrapper{max-width:900px;min-width:520px;margin:0 auto;padding:0 0 0 160px;}#bang{position:fixed;width:175px;top:43px;left:373px;display:none;outline:0;font-size:83.3%;z-index:100;}#bang option:hover{background:#86cbf4;color:#000;}#bottom_spacing{clear:both;padding-bottom:775px;}#bottom_spacing2{clear:both;padding-bottom:225px;}#content_wrapper{position:relative;z-index:1;padding-top:15px;padding-right:50px;}#content{max-width:900px;min-width:520px;padding:50px 0 0 62px;padding-top:expression("50px");_width:expression("600px");}#content_homepage{padding-top:10px;margin:auto;max-width:600px;}#content_internal{padding-left:15px;font-size:95.2%;}#content_wrapper_homepage{margin:auto;max-width:600px;}#did_you_mean{padding-bottom:5px;padding-left:33px;border:1px solid #fff;padding-top:4px;padding-bottom:4px;margin-bottom:10px;}#error_homepage{clear:both;padding-top:20px;font-weight:bold;color:#f00;text-align:center;margin:auto;display:none;}#feedback_wrapper{display:none;padding-top:15px;padding-bottom:4px;}#feedback{background:url("assets/icon_feedback.v101.png") no-repeat;cursor:pointer;height:19px;width:71px;float:left;margin-right:5px;}#feedback:active{background-position:0 -38px;}#footer_homepage{vertical-align:middle;background:#fbfbfb;border-top:1px solid #e5e5e5;bottom:0;font-size:13px;left:0;padding-top:7px;padding-bottom:7px;position:absolute;width:100%;}#footer_homepage_left{float:left;padding-left:15px;}#footer_homepage_right{float:right;padding-right:15px;}#footer_homepage_right a{color:#747474;border-left:1px dotted #999;height:27px;padding-left:10px;}#header_wrapper{display:none;position:fixed;z-index:2;left:0;right:0;width:100%;}#header_wrapper #header{background:#cd473b url("assets/header_bg.v101.png") repeat-x;height:57px;min-width:560px;width:100%;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,0.2);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,0.2);box-shadow:0 0 5px 0 rgba(0,0,0,0.2);}#header_wrapper #header #header_content_wrapper #header_content{max-width:900px;min-width:803px;margin:0;padding-left:85px;}#header_wrapper #header #header_content_wrapper #header_content #header_logo{float:left;width:40px;height:57px;margin:0 0 -100px -80px;background:url("assets/logo_header.v101.png") no-repeat;}#header_wrapper #header #header_content_wrapper #header_content #header_logo img{width:98px;height:141px;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper{float:left;font-weight:normal;font-size:83.3%;margin-left:40px;margin-top:7px;width:70px;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper ul{padding:0;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button{background:url("assets/header_button_bg.v101.png") repeat-x;border:1px solid #b24d26;border-bottom:1px solid #ca5945;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:37px;list-style:none;margin:0 auto;cursor:pointer;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button:active{background-position:0 -37px;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button li{display:block;list-style:none;float:left;margin:0!important;height:19px;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button a{display:block;margin:0 2px;border:1px solid transparent;border-bottom:0;padding:2px 3px 3px;color:#2b68b3;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper{position:relative;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper a.header_button_menu_item{outline:none;background:url("assets/header_button_triangle.v101.png") no-repeat;background-position:right 15px;color:#fff;cursor:pointer;height:18px;margin-top:0;margin-right:7px;padding-left:7px;padding-right:15px;padding-top:8px;padding-bottom:10px;text-align:right;text-align:center;text-shadow:#85361f 0 -1px;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper a:hover,#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper a:focus{text-decoration:none!important;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper:hover #header_button_menu,#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper:focus #header_button_menu{left:auto;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper:hover a,#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper:focus a{color:#1168cc!important;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper:hover a.header_button_menu_item,#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper:focus a.header_button_menu_item{color:#fff!important;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper #header_button_menu{display:none;margin:0;float:left;position:fixed;background:#fff;border:1px solid #ddd;margin-left:-17px;margin-top:0;margin-right:0;-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,0.2);-moz-box-shadow:0 1px 3px 0 rgba(0,0,0,0.2);box-shadow:0 1px 3px 0 rgba(0,0,0,0.2);}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper #header_button_menu li{display:block;list-style:none;float:none;height:auto;font-weight:normal;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper #header_button_menu li.header_button_menu_header{background-color:#f7f7f7;color:#3f4651!important;letter-spacing:1px;font-size:78.6%;border-top:1px dotted #d1d3d6;border-bottom:1px dotted #d1d3d6;padding-top:6px;padding-bottom:6px;padding-left:7px;padding-right:10px;font-weight:bold!important;cursor:default;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper #header_button_menu a{display:block;padding-bottom:3px;padding-top:2px;padding-left:5px;margin:1px;background-color:#fff;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper #header_button_menu a:hover,#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper #header_button_menu a:focus{background-color:#1258ae;color:#fff!important;font-weight:bold;}#header_wrapper #header #header_content_wrapper #header_content #header_button_wrapper #header_button #header_button_menu_wrapper #header_button_menu:after{content:"-";font-size:1px;display:block;position:fixed;opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);}#iframe_hidden{height:0;width:0;display:none;}#keyboard_shortcuts{clear:both;width:130px;}#links_wrapper{max-width:759px;}#links{padding-top:15px;width:86.5%;}#links a:focus{outline:none;text-decoration:none;}#loading{margin-left:29px;}#logo_internal{background:url("/assets/logo_words.v101.png") no-repeat left 10px;height:63px;}#logo_homepage{background:url("/assets/logo_homepage.normal.v102.png") no-repeat center top;margin:auto;padding-bottom:1px;margin-bottom:40px;margin-top:40px;height:161px;text-align:center;color:transparent;text-indent:-9999px;font-size:0;width:202px;}#official_site{padding-top:3px;}#powered_by_wrapper{display:none;}#powered_by{clear:right;font-size:11px;text-align:right;color:#777;padding-top:4px;padding-bottom:2px;}#powered_by a{color:#777;}#search_elements_hidden{display:none;height:0;}#search_form{float:left;width:554px;margin-left:-25px;border-bottom:1px solid #cc6a5f;border-left:0 solid #e37552;border-top:0 solid #ec9a77;border-right:0 solid #e37552;-moz-border-radius:5px;-webkit-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;margin-top:7px;}#search_form_homepage{width:518px;margin:auto;text-align:left;}#search_dropdown{display:block;float:left;width:24px;height:37px;background:url("assets/search_dropdown.v102.png");background-position:top right;outline:none;}#search_dropdown:active{background-position:right bottom;}#search_dropdown_homepage{display:block;float:left;width:23px;height:40px;background:url("assets/search_dropdown_homepage.v102.png") no-repeat;background-position:top right;}#search_dropdown_homepage:active{background-position:right bottom;}#search_form_input{float:right;background:#fff;color:#222;width:446px;height:27px;padding:4px 6px 4px 8px;margin:0;outline:none;border:#835342 solid 1px;border-right:0;font-size:95.2%;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;}#search_form_input_homepage{float:right;background:#fff;color:#222;width:430px;height:28px;padding:4px 6px 5px 6px;margin:0;outline:none;border:#8d8d8d solid 1px;border-right:0;font-size:18px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,0.2);-moz-box-shadow:0 1px 2px 0 rgba(0,0,0,0.2);box-shadow:0 1px 2px 0 rgba(0,0,0,0.2);-moz-box-shadow:0 1px 2px 0 rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 2px #999;-webkit-box-shadow:inset 1px 1px 2px #999;-moz-box-shadow:inset 1px 1px 2px #999;box-shadow:inset 1px 1px 2px #999;}#search_wrapper{float:right;width:67px;height:37px;hidden;}#search_wrapper_homepage{float:right;height:39px;width:67px;background:#2db750;overflow:hidden;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,0.2);-moz-box-shadow:0 1px 2px 0 rgba(0,0,0,0.2);box-shadow:0 1px 2px 0 rgba(0,0,0,0.2);-moz-box-shadow:0 1px 2px 0 rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,0.2);}#search_form_input_clear{float:right;width:25px;border:0;background:#fff url("assets/icon_xon.v101.png") no-repeat left center;cursor:pointer;height:37px;margin:0;outline:none;border:none;*border-left:#fff solid 1px;*border-right:#fff solid 1px;border-bottom:#835342 solid 1px;border-top:#835342 solid 1px;}#search_form_input_clear:active{background:#fff url("assets/icon_xoff.v101.png") no-repeat left center;}#search_button{float:left;height:37px;width:43px;border:0;background:url("assets/search_dropdown.v102.png");cursor:pointer;outline:none;}#search_button:active{background-position:0 -37px;}#search_button_homepage{float:left;height:39px;width:44px;border:0;background:url("assets/search_dropdown_homepage.v102.png") no-repeat;cursor:pointer;}#search_button_homepage:active{background-position:0 -39px;}#side_wrapper{max-width:759px;display:none;position:relative;margin:0;padding:0;}#side_wrapper2{width:130px;position:absolute;right:-100px;top:25px;font-size:71.4%;color:#545454;}#side{background-color:#fcfcfc;position:fixed;width:130px;z-index:1;margin-top:-15px;}#side_map{padding-bottom:20px;}#side_sponsored{text-align:left;}#side_suggestions{text-align:left;}#spacing_hidden{height:0;display:none;float:left;font-size:83.3%;padding-bottom:40px;}#state_hidden{height:0;border:0;width:0;display:none;}#zero_click_wrapper{padding-top:20px;max-width:759px;display:block;}#zero_click{background:#f9f9f9;border:1px solid #d2d2d2;width:86.5%;-moz-border-radius:6px;-webkit-border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;z-index:10;}#zero_click blockquote{background-color:#eee;margin-bottom:10px;padding:5px 5px 1px;}#zero_click blockquote,q{quotes:none;}#zero_click p{clear:both;margin-bottom:5px;}#zero_click pre{background-color:#eee;font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;margin-bottom:5px;padding:5px;margin-right:10px;word-wrap:break-word;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;}#zero_click_plus_wrapper,#zero_click_plus_wrapper a{float:right;width:14px;top:0;margin-left:7px;margin-right:5px;text-align:right;text-decoration:none!important;padding-bottom:2px;}#zero_click_plus{background:url("assets/icon_minus.v101.png") no-repeat;height:14px;margin-top:5px;}#zero_click_abstract,#zero_click_abstract_stacked{font-size:83.3%;line-height:1.4;word-wrap:break-word;border:1px solid #f9f9f9;padding:2px;margin:2px;margin-top:4px;padding-top:0;margin-bottom:2px;}#zero_click_answer{margin-left:25px;}#zero_click_heading{float:left;margin-top:0;margin-bottom:0;}#zero_click_header_info{padding-top:10px;padding-left:65px;font-size:77.8%;}#zero_click_image{float:right;max-width:100px;margin-top:10px;margin-left:15px;margin-right:10px;padding-bottom:10px;padding-right:3px;line-height:1.2;font-size:83.3%;text-align:center;}#zero_click_message{padding-left:33px;font-size:83.3%;padding-bottom:10px;padding-top:5px;}#zero_click_topics{font-size:83.3%;margin-left:10px;margin-bottom:4px;}.add_to_browser{height:300px;width:200px;background-color:#ddd;display:none;position:fixed;bottom:50px;right:0;text-align:left;padding:10px;margin:10px;-moz-border-radius:10px;-webkit-border-radius:10px;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;z-index:1000;font-size:14px;}.clear{clear:both;height:0;font-size:0;line-height:0;}.hide{display:none;}.hidden{display:none;}.highlight_sponsored{background:#fff7d0;border:1px solid #fef9eb!important;-moz-border-radius:6px;-webkit-border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;margin-bottom:2px;}.highlight_sponsored_hover{background:#eae3ad!important;}.highlight{background:url("assets/results_highlight_bg.v101.png") repeat-x;background-color:#eaeaea;border:1px solid #bfbfbf!important;-moz-border-radius:6px;-webkit-border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;cursor:pointer;}.highlight_zero_click_wrapper{border:1px solid #f9f9f9;padding:2px;}.horizontal_line{height:1px;margin:0;padding:0;border:none;color:#bade89;background-color:#d2d2d2;text-align:left;}.horizontal_line_truncated{width:85%;}.icon_fav,.icon_fav2,.icon_category,.icon_disambig{float:left;display:none;}.icon_category{width:58px;text-align:right;}.icon_zero_click_header{float:right;display:inline;margin-top:0;padding-right:10px;}.icon_fav3,.icon_spice{display:inline;float:left;padding-right:5px;width:16px;height:16px;}.icon_spice{padding-top:2px;}.icon_spice_inline{display:inline;padding-left:1px;padding-right:3px;width:16px;height:16px;text-align:center;position:relative;top:2px;}.icon_disambig{width:38px;text-align:right;padding-top:5px;}.icon_fav img,.icon_fav2 img,.icon_category img,.icon_disambig img{visibility:hidden;padding-right:8px;}.icon_fav img,.icon_fav2 img{width:16px;height:16px;}.icon_fav img,.icon_category img{padding-top:5px;}.icon_category img,.icon_disambig img{display:inline;}.icon_fav2 img{padding-top:5px;}.icon_zero_click_answer{float:left;padding-top:4px;padding-left:8px;padding-right:10px;display:inline;}.img_badge{display:inline;vertical-align:top;}.img_category{max-height:50px;max-width:50px;width:expression("50px");}.img_disambig{max-height:30px;max-width:30px;width:expression("30px");margin-top:3px;}.img_zero_click{max-height:100px;max-width:100px;width:expression("100px");}.img_zero_click_big{max-width:85%;margin:auto;margin-bottom:5px;margin-top:5px;}.inline{display:inline;}.links_deep,.links_main,.links_more{font-size:83.3%;}.links_indent{padding-left:35px;}.links_main{text-align:left;margin-left:30px;word-wrap:break-word;*zoom:1;}.links_main:before,.links_main:after{content:"";display:table;}.links_main:after{clear:both;}.links_main div a.hidden{display:inline;visibility:hidden!important;}.links_menu,.links_menu a{background:url("assets/icon_triangle.v101.png") no-repeat 0 4px;font-size:85.7%;color:#555!important;float:right;padding-right:20px;padding-left:10px;}.links_menu_wrapper{width:200px;display:inline;overflow:hidden;position:relative;}.links_menu_wrapper:hover,.links_menu_wrapper:focus{overflow:visible;}.links_menu_items{margin:0;float:left;position:absolute;top:-20px;left:-2000px;display:block;background:#fff;border:1px solid #ddd;margin-left:2px;margin-top:-1px;margin-right:0;-moz-box-shadow:0 1px 3px 0 rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,0.2);-moz-box-shadow:0 1px 3px 0 rgba(0,0,0,0.2);box-shadow:0 1px 3px 0 rgba(0,0,0,0.2);width:150px;text-align:left;}.links_menu_wrapper:hover .links_menu_items,.links_menu_wrapper:focus .links_menu_items{left:20px;}.links_menu_items:after{content:"-";font-size:1px;display:block;position:fixed;opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);}.links_menu_items li{display:block;list-style:none;float:none;height:auto;font-weight:normal;}.links_menu_items a{display:block;padding:2px 3px;margin:0;background-color:#fff;}.links_more{text-align:left;margin-left:58px;word-wrap:break-word;}.links_type{font-size:65%;}.links_zero_click{text-align:left;padding-left:5px;margin-right:5px;word-wrap:break-word;}.links_zero_click_disambig{text-align:left;margin-left:33px;margin-right:10px;padding:4px;word-wrap:break-word;border:1px solid #f9f9f9;}.page_count{float:left;color:#555;font-size:71.4%;text-align:left;}.page_count_pre,.page_count_post{color:#fff;background-color:#fff;border:1px dotted #777;border-style:none none dotted;height:1px;text-align:right;float:left;}.page_count_pre{width:10%;}.page_count_post{width:70%;}.results_links,.results_zero_click,.results_disambig,.results_links_more,.results_category_more,.results_disambig_more{clear:left;padding-top:10px;padding-bottom:10px;border:1px solid #fcfcfc;}.results_links_deep{padding-left:5px;padding-top:10px;padding-bottom:10px;border:1px solid #fcfcfc;}.results_links{padding-left:5px;}.results_links_more{padding-left:33px;}.results_category_more{padding-left:63px;}.results_disambig_more{margin-left:33px;margin-right:10px;padding:5px;padding-bottom:3px;padding-top:3px;}.results_zero_click,.results_zero_click_more{padding-bottom:3px;padding-top:3px;border:1px solid #f9f9f9;}.results_disambig_more,.results_disambig{border:1px solid #f9f9f9;}.results_disambig{padding-bottom:0;padding-top:0;}.results_zero_click{clear:none;padding-top:3px;}.results_zero_click_more{padding-top:3px;padding-left:5px;font-size:90%;}.search_suggestion{background-color:#666;background:#f5f5f5 url("assets/side_button_off.v101.png") repeat-x;line-height:1.4;padding:4px;padding-top:4px;padding-bottom:5px;margin-bottom:7px;cursor:pointer!important;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:#e4e4e4 solid 1px;border:1px solid #e4e4e4;width:130px;}.search_suggestion:hover{background-color:#f0f0f0;background:#e2e2e2 url("assets/side_button_on.v101.png") repeat-x;border:1px solid #adadad;}.search_suggestion:active{background-color:#bbb;}.search_suggestion a{background:url("assets/icon_plus.v102.png") no-repeat left center;padding-left:14px;color:#333!important;text-decoration:none!important;}.small{font-size:83.3%;}.snippet,.snippet a{clear:both;line-height:1.4;color:#333!important;text-decoration:none!important;}.snippet{font-size:92.8%;}.spacer_bottom_7{padding-bottom:7px;}.spacer_bottom_10{padding-bottom:10px;}.spacer_top_3{padding-top:3px;}.spacer_top_10{padding-top:10px;}.url,.url a{color:#781900!important;font-size:92.8%;}.zero_click_answer{padding-left:5px!important;margin-left:30px!important;margin-right:50px!important;}.zero_click_header_info{font-style:normal;}.zero_click_snippet{padding:10px;padding-top:5px;padding-bottom:3px;padding-left:5px!important;margin-left:10px!important;}.zero_click_snippet_no_image{padding:0;padding-bottom:5px;margin-left:10px!important;padding-left:5px!important;}@media only screen and (max-device-width:599px){#content,#content_wrapper,#content_homepage,#content_wrapper_homepage,#zero_click_wrapper,#links_wrapper,#zero_click,#links{width:97%;min-width:97%;margin:auto;padding-right:0;}#content{margin:auto;padding-left:0;padding-top:50px;}#header_button_wrapper,#search_dropdown,#bang_wrapper,#search_dropdown_homepage{display:none;}#logo_homepage{background:url("/assets/logo_homepage_mobile.normal.v101.png") no-repeat center top;width:275px;height:62px;padding-bottom:20px;margin-bottom:0;}#search_form{width:236px;}#search_form_homepage{width:220px;}#search_wrapper{width:42px;}#search_wrapper_homepage{width:42px;}#search_form_input{width:153px;}#search_form_input_homepage{width:163px;}}@media only screen and (max-device-width:599px) and (orientation:landscape){#search_form{width:336px;}#search_form_input{width:253px;}#search_form_homepage{width:313px;}#search_form_input_homepage{width:253px;}}@media only screen and (-webkit-min-device-pixel-ratio:1.5){#content_homepage{width:97%;min-width:97%;margin:auto;padding-right:0;}#search_dropdown,#search_dropdown_homepage{display:none;}#logo_homepage{background:url("/assets/logo_homepage_mobile.normal.v101.png") no-repeat center top;width:275px;height:62px;padding-bottom:20px;margin-bottom:0;}#search_form{width:236px;}#search_form_homepage{width:220px;}#search_wrapper{width:42px;}#search_wrapper_homepage{width:42px;}#search_form_input{width:153px;}#search_form_input_homepage{width:163px;}}@media only screen and (-webkit-min-device-pixel-ratio:1.5) and (orientation:landscape){#search_form{width:312px;}#search_form_input{width:253px;}#search_form_homepage{width:352px;}#search_form_input_homepage{width:287px;}}#wwo_outer{background:#f9f9f9!important;padding-left:15px!important;padding-bottom:5px!important;}
html {
overflow: hidden;
- background: -o-linear-gradient(from(#fcfcfc), to(#f8f8f8)) !important;
+ background: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#f8f8f8));
height: auto;
border: 0;
- color: black !important;
}
body {
@@ -50,6 +51,17 @@
border-right: 0 !important;
}
+#search_form_input_clear {
+ height: 39px;
+ border: #8d8d8d solid 1px !important;
+ border-right: 0 !important;
+ border-left: 0 !important;
+ font-size: 18px;
+ -webkit-box-shadow: inset -1px 0px 1px rgba(0, 0, 0, 0.3) !important;
+ box-shadow: inset -1px 0px 1px rgba(0, 0, 0, 0.3) !important;
+ background: #fff;
+}
+
#search_wrapper_homepage {
width: 57px !important;
}
@@ -163,36 +175,19 @@
#advanced #right ul.left {
padding-left: 1px;
}
-
-#search_form_input_clear {
- height: 39px;
- border: #8d8d8d solid 1px !important;
- border-right: 0 !important;
- border-left: 0 !important;
- outline: none !important;
- font-size: 18px;
- -webkit-box-shadow: inset -2px 0px 2px -1px rgba(0, 0, 0, 0.3) !important;
- box-shadow: inset -2px 0px 2px -1px rgba(0, 0, 0, 0.3) !important;
- background: #fff;
-}
-
-#search_form_input_clear:active {
- background: #fff url("../img/icon_xoff.v101.png") no-repeat left center !important;
-}
</style>
</head>
<body>
<div id="topbar">
-<form id="search_form_homepage" name="x" onsubmit="return search();">
+<form id="search_form_homepage" name="x">
<div id="sxd"></div>
<div id="search_wrapper_homepage">
<input id="search_button_homepage" type="submit" value="" />
</div>
-<input id="search_form_input_clear" type="button" value="" tabindex="3"
-onclick="return search_input_clear();"></input>
+<input id="search_form_input_clear" type="button" value="" tabindex="3"></input>
<input type="text" autocomplete="off"
name="q" id="search_form_input_homepage" placeholder="Search DuckDuckGo..."
- onFocus="if ('rc' in window) {nua('nro',rc)};fq=1;" onBlur="fq=0" onclick="if (this.value=='put search terms here') {this.value='';this.style.color='#000000';}" value="">
+ value="">
</form>
<img id="icon_advanced" class="maximized" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2Fy
ZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAA
@@ -233,19 +228,19 @@
<h2>SPECIAL</h2>
<ul>
<li>
- <input type="checkbox" id="adv_ducky" onclick="return ducky_check()">
+ <input type="checkbox" id="adv_ducky">
<label for="adv_ducky">
I am feeling Ducky
</label>
</li>
<li>
- <input type="checkbox" id="adv_meanings" onclick="return meanings_check()">
+ <input type="checkbox" id="adv_meanings">
<label for="adv_meanings">
Show Meanings
</label>
</li>
<li>
- <input type="checkbox" id="zeroclickinfo" onclick="return zeroclickinfo_check()">
+ <input type="checkbox" id="adv_zeroclick">
<label for="zeroclickinfo">
Answers on Google/Bing
</label>
@@ -256,37 +251,37 @@
<div id="right">
<h2>FEATURED BANGS</h2>
<ul class='left'>
- <li class="button" onclick="return add_bang('!a');">
+ <li class="button" id="bang_a" onclick="return add_bang('!a');">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAJCAMAAAA4jZ0cAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpCREIzMTNEOTI2MjA2ODExOTJCMEZCNkFGMDgyOTlGRiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCMjZFQzVBRDlFRTUxMUUxQThENjk3Nzc4MDM2MTg3NSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCMjZFQzVBQzlFRTUxMUUxQThENjk3Nzc4MDM2MTg3NSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTRCNkI2MEQxMTIwNjgxMThBNkRBODgwNTQzNTE4NDEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QkRCMzEzRDkyNjIwNjgxMTkyQjBGQjZBRjA4Mjk5RkYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4CS5bAAAAADFBMVEWfn5/////CwsL///+/0LgLAAAABHRSTlP///8AQCqp9AAAACtJREFUeNpsikEKADAMwjT+/8+19DRYIMGDSiJtKjyjwPWQbWg+52o3I8AAGIEAnR9vbgMAAAAASUVORK5CYII=" />
Amazon (<em>!a</em>)
</li >
- <li class="button" onclick="return add_bang('!gi');">
+ <li class="button" id="bang_gi" onclick="return add_bang('!gi');">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAJCAMAAAA4jZ0cAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgM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g+52o3I8AAGIEAnR9vbgMAAAAASUVORK5CYII=" />
Google Images (<em>!gi</em>)
</li>
- <li class="button" onclick="return add_bang('!bi');">
+ <li class="button" id="bang_bi" onclick="return add_bang('!bi');">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAJCAMAAAA4jZ0cAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpCREIzMTNEOTI2MjA2ODExOTJCMEZCNkFGMDgyOTlGRiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCMjZFQzVBRDlFRTUxMUUxQThENjk3Nzc4MDM2MTg3NSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCMjZFQzVBQzlFRTUxMUUxQThENjk3Nzc4MDM2MTg3NSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTRCNkI2MEQxMTIwNjgxMThBNkRBODgwNTQzNTE4NDEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QkRCMzEzRDkyNjIwNjgxMTkyQjBGQjZBRjA4Mjk5RkYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4CS5bAAAAADFBMVEWfn5/////CwsL///+/0LgLAAAABHRSTlP///8AQCqp9AAAACtJREFUeNpsikEKADAMwjT+/8+19DRYIMGDSiJtKjyjwPWQbWg+52o3I8AAGIEAnR9vbgMAAAAASUVORK5CYII=" />
Bing Images (<em>!bi</em>)
</li>
- <li class="button" onclick="return add_bang('!m');">
+ <li class="button" id="bang_m" onclick="return add_bang('!m');">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAJCAMAAAA4jZ0cAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpCREIzMTNEOTI2MjA2ODExOTJCMEZCNkFGMDgyOTlGRiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCMjZFQzVBRDlFRTUxMUUxQThENjk3Nzc4MDM2MTg3NSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCMjZFQzVBQzlFRTUxMUUxQThENjk3Nzc4MDM2MTg3NSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTRCNkI2MEQxMTIwNjgxMThBNkRBODgwNTQzNTE4NDEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QkRCMzEzRDkyNjIwNjgxMTkyQjBGQjZBRjA4Mjk5RkYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4CS5bAAAAADFBMVEWfn5/////CwsL///+/0LgLAAAABHRSTlP///8AQCqp9AAAACtJREFUeNpsikEKADAMwjT+/8+19DRYIMGDSiJtKjyjwPWQbWg+52o3I8AAGIEAnR9vbgMAAAAASUVORK5CYII=" />
Map (<em>!m</em>)
</li>
</ul>
<ul class='right'>
- <li class="button" onclick="return add_bang('!n');">
+ <li class="button" id="bang_n" onclick="return add_bang('!n');">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAJC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gwNTQzNTE4NDEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QkRCMzEzRDkyNjIwNjgxMTkyQjBGQjZBRjA4Mjk5RkYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4CS5bAAAAADFBMVEWfn5/////CwsL///+/0LgLAAAABHRSTlP///8AQCqp9AAAACtJREFUeNpsikEKADAMwjT+/8+19DRYIMGDSiJtKjyjwPWQbWg+52o3I8AAGIEAnR9vbgMAAAAASUVORK5CYII=" />
News (<em>!n</em>)
</li >
- <li class="button" onclick="return add_bang('!w');">
+ <li class="button" id="bang_w" onclick="return add_bang('!w');">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAJCAMAAAA4jZ0cAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpCREIzMTNEOTI2MjA2ODExOTJCMEZCNkFGMDgyOTlGRiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCMjZFQzVBRDlFRTUxMUUxQThENjk3Nzc4MDM2MTg3NSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCMjZFQzVBQzlFRTUxMUUxQThENjk3Nzc4MDM2MTg3NSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTRCNkI2MEQxMTIwNjgxMThBNkRBODgwNTQzNTE4NDEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QkRCMzEzRDkyNjIwNjgxMTkyQjBGQjZBRjA4Mjk5RkYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4CS5bAAAAADFBMVEWfn5/////CwsL///+/0LgLAAAABHRSTlP///8AQCqp9AAAACtJREFUeNpsikEKADAMwjT+/8+19DRYIMGDSiJtKjyjwPWQbWg+52o3I8AAGIEAnR9vbgMAAAAASUVORK5CYII=" />
Wikipedia (<em>!w</em>)
</li>
- <li class="button" onclick="return add_bang('!yt');">
+ <li class="button" id="bang_yt" onclick="return add_bang('!yt');">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAJCAMAAAA4jZ0cAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+ID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mQ9InIiPz4CS5bAAAAADFBMVEWfn5/////CwsL///+/0LgLAAAABHRSTlP///8AQCqp9AAAACtJREFUeNpsikEKADAMwjT+/8+19DRYIMGDSiJtKjyjwPWQbWg+52o3I8AAGIEAnR9vbgMAAAAASUVORK5CYII=" />
Youtube (<em>!yt</em>)
</li>
@@ -301,266 +296,4 @@
<div style='clear:both'></div>
</div>
-<script type="text/javascript">
-
-var prefill_text = 'Search DuckDuckGo...';
-
-defaults_check();
-
-
-var search_form_input_homepage = document.getElementById('search_form_input_homepage');
-search_form_input_homepage.style.color = '#999999';
-search_form_input_homepage.value = prefill_text;
-
-
-document.getElementById('search_form_input_homepage').focus();
-
-document.getElementById('search_form_homepage').onsubmit = function(){
- search();
-}
-
-document.getElementById("search_form_input_homepage").onkeydown = function(){
- opera.extension.postMessage({log: this.value});
- if (this.value == prefill_text)
- this.value = '';
-
- this.style.color = '#000000';
-};
-document.getElementById("search_form_input_homepage").onkeyup = function(){
- if (this.value == '') {
- this.style.color = '#999999';
-
- this.value = prefill_text;
- document.getElementById('search_form_input_homepage').focus();
- }
-};
-
-if (localStorage['advanced_options'] === undefined) {
- localStorage['advanced_options'] = 'true';
-}
-
-if (localStorage['advanced_options'] !== 'true') {
- document.getElementById('icon_advanced').src =
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2Fy" +
- "ZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAA"+
- "AAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5U"+
- "Y3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6"+
- "eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8x"+
- "Mi8wNy0xMDo1NzowMSAgICAg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y8YMNAgJGREczm"+
- "4+NjkJKSAmJJV1ZW1nPd3f1muAzU4ubm3iQjI8vFwcFBMOw4ObkYgBYLA32yA2io"+
- "HIaB3NxcS8XExLhBLkEHQUF+YIwOmJmZGcTExAU5OTnnw8QYobHsLSMjvYWdHbvL"+
- "7t69C7ZFWVn5Pzb5b9++MTx//twWGONHwC6UkpIowWUYMYCLi4tBQkK8GO5lFhZW"+
- "MwYKATDC7OHJhomJmQs9zJABMNCxiq9btwk5PPnhBgKjn+Hfv3/IBjBicwW6OHKY"+
- "AtMrI9zLQA56YP9Hw4TEQWb8hbtQQID/24sXP7iRbEaPZaziyICfn/8j3IXCwkLn"+
- "KI0UMTGRI3AD1dVV+4WEBMk2TFxcjEFJSbEfbiAwsNfr6WlfAEUODoARZojkwsag"+
- "ra15EMg8iJL1hISEos3MjL+ysGAWQKCwwxZ+oJLI3Nz0AzAOEjHyMtCV14BO93Nw"+
- "sPlGjPdFRUUYHBxsP4iICHsBuffR8zJyCawFpOa8fPnK8smTpwwfPnxi+PgRHIHA"+
- "1CDAICjIzwDM9yAD90HLw/vI+hlxVQFAg0EldjgQG0AxCJyF4pVAH+3DVgUABBgA"+
- "ktWRIZgIcFYAAAAASUVORK5CYII=";
- document.getElementById('advanced').style.display = 'none';
- document.getElementById('icon_advanced').className = 'minimized';
- opera.extension.postMessage({minimize: true});
-}
-
-
-window.addEventListener('DOMContentLoaded', function(){
-
- if (localStorage['last_search'] != '' &&
- localStorage['last_search'] != undefined &&
- widget.preferences['remember_last_search'] === 'true') {
- document.getElementById('search_form_input_homepage').value = localStorage['last_search'];
- document.getElementById('search_form_input_homepage').style.color = '#000000';
- document.getElementById("search_form_input_clear").style.background = '#fff url("../img/icon_xon.v101.png") no-repeat left center';
- } else {
- search_input_clear();
- }
-
- document.getElementById("search_form_input_homepage").focus();
- document.getElementById("search_form_input_homepage").addEventListener('keydown', function(){
- this.style.color = '#000000';
- document.getElementById("search_form_input_clear").style.background = '#fff url("../img/icon_xon.v101.png") no-repeat left center';
- console.log(document.getElementById("search_form_input_clear").style.background);
- });
- document.getElementById("search_form_input_homepage").addEventListener('keyup', function(){
- if (this.value == '') {
- this.style.color = '#999999';
- document.getElementById("search_form_input_clear").style.background = '#fff';
- document.getElementById('search_form_input_homepage').focus();
- }
- });
-}, false);
-
-
-function search(){
- var input = document.getElementById("search_form_input_homepage").value;
-
- if (widget.preferences['remember_last_search'] === 'true') {
- localStorage['last_search'] = input;
- } else {
- search_input_clear();
- }
-
-
- if (document.getElementById('adv_ducky').checked === true) {
- input = "\\" + input;
- }
-
- var special = '';
- if(document.getElementById('adv_meanings').checked !== true) {
- special = '&d=1';
- }
-
- opera.extension.postMessage({tab: "https://duckduckgo.com/?q="+encodeURIComponent(input)+special});
- window.close();
-}
-document.getElementById('icon_advanced').onclick = function(){
- if (this.className == 'minimized') {
- this.src =
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2Fy" +
- "ZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAA"+
- "AAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5U"+
- "Y3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6"+
- "eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8x"+
- "Mi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRw"+
- "Oi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpE"+
- "ZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRv"+
- "YmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXB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UnmyAzpb8"+
- "9+8/XEFQkB9RBq1btwnOBgaXDNxAYJpj+fnzN1wSGB5EOVdZWfk/koGsSF7m+IOe"+
- "1IjEcMDJyfEb7kJgQn7+8eNnZSSbSQ5HISHBx3AXiomJbKQkUkBZU0pKciXcQBkZ"+
- "6Vny8rL/yTVQQUHur5iY6Fy4gcBIuKmpqb6Ql5eHZMNA2VRDQ30OrPRhQgQqZ4GF"+
- "hek9UgwFGWZpaXoDmJ9LMPIy0JUfgSWMi4OD7W0lJQW8hQMozJSVFRns7a2vcnNz"+
- "uyAXYejFF6gEBjmx69u372mPHz9hfvfuPbAM/AGW4+LiZBAWFgKGudRvoI9mAoUq"+
- "CZWHyAbLQUtsSyCWhgo/AuIjQLwS6KOn2KoAgAADAOuniZmdabpzAAAAAElFTkSu"+
- "QmCC";
- document.getElementById('advanced').style.display = 'block';
- this.className = 'maximized';
- opera.extension.postMessage({maximize: true});
- } else {
- this.src =
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2Fy" +
- "ZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAA"+
- "AAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5U"+
- "Y3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6"+
- "eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8x"+
- "Mi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRw"+
- "Oi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpE"+
- "ZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vb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b9++MTx//twWGONHwC6UkpIowWUYMYCLi4tBQkK8GO5lFhZW"+
- "MwYKATDC7OHJhomJmQs9zJABMNCxiq9btwk5PPnhBgKjn+Hfv3/IBjBicwW6OHKY"+
- "AtMrI9zLQA56YP9Hw4TEQWb8hbtQQID/24sXP7iRbEaPZaziyICfn/8j3IXCwkLn"+
- "KI0UMTGRI3AD1dVV+4WEBMk2TFxcjEFJSbEfbiAwsNfr6WlfAEUODoARZojkwsag"+
- "ra15EMg8iJL1hISEos3MjL+ysGAWQKCwwxZ+oJLI3Nz0AzAOEjHyMtCV14BO93Nw"+
- "sPlGjPdFRUUYHBxsP4iICHsBuffR8zJyCawFpOa8fPnK8smTpwwfPnxi+PgRHIHA"+
- "1CDAICjIzwDM9yAD90HLw/vI+hlxVQFAg0EldjgQG0AxCJyF4pVAH+3DVgUABBgA"+
- "ktWRIZgIcFYAAAAASUVORK5CYII=";
- document.getElementById('advanced').style.display = 'none';
- this.className = 'minimized';
- opera.extension.postMessage({minimize: true});
- }
- localStorage['advanced_options'] = (document.getElementById('advanced').style.display === 'block');
- document.getElementById('search_form_input_homepage').focus();
-}
-
-function add_bang(bang) {
- var inp = document.getElementById('search_form_input_homepage');
-
- var bang_regex = /\!\w+/;
-
- if (inp.value === prefill_text || inp.value === '') {
- inp.style.color = '#000';
- inp.value = bang + ' ';
- inp.focus();
- } else {
- var found_bangs = bang_regex.exec(inp.value);
- if (found_bangs.length > 0) {
- inp.value = inp.value.replace(found_bangs[0], bang);
- } else {
- inp.value += bang;
- search();
- }
- }
-}
-
-function ducky_check(){
- widget.preferences['ducky'] = document.getElementById('adv_ducky').checked;
-}
-
-function meanings_check(){
- widget.preferences['meanings'] = document.getElementById('adv_meanings').checked;
-}
-
-function zeroclickinfo_check(){
- widget.preferences['zeroclickinfo'] = document.getElementById('zeroclickinfo').checked;
-}
-
-function defaults_check(){
- if (widget.preferences['ducky'] === 'true') {
- document.getElementById('adv_ducky').checked = true;
- }
-
- if (widget.preferences['meanings'] === 'true') {
- document.getElementById('adv_meanings').checked = true;
- }
-
- if (widget.preferences['zeroclickinfo'] === 'true') {
- document.getElementById('zeroclickinfo').checked = true;
- }
-
-}
-
-function search_input_clear() {
- document.getElementById('search_form_input_homepage').value = prefill_text;
- document.getElementById("search_form_input_clear").style.background = '#fff';
- document.getElementById("search_form_input_homepage").style.color= '#999';
- document.getElementById('search_form_input_homepage').focus();
-}
-
-
-</script>
-
</body></html>
View
BIN  img/icon_16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  img/icon_18.png
Deleted file not rendered
View
BIN  img/icon_48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  img/icon_xoff.v101.png
Deleted file not rendered
View
BIN  img/icon_xon.v101.png
Deleted file not rendered
View
118 includes/_03_bing.js
@@ -1,118 +0,0 @@
-// ==UserScript==
-// @include http://*.bing.com/*
-// @include https://*.bing.com/*
-// ==/UserScript==
-
-/*
- * Copyright (C) 2012 DuckDuckGo, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var options = widget.preferences;
-console.log = opera.postError;
-
-var ddgBox = new DuckDuckBox('q', [], 'results', false);
-
-ddgBox.search = function(query) {
-
- opera.extension.postMessage({ query: query });
-
- if (options.dev)
- console.log("query:", query);
-}
-
-var cssInjected = false;
-var path = 'css/bing.css';
-window.addEventListener('DOMContentLoaded', function() {
-
- // Specify the path to the stylesheet here:
- opera.extension.postMessage({
- topic: 'LoadInjectedCSS',
- data: path
- });
-
- // instant search
- window.$('[name="q"]').keyup(function(e){
- var query = getQuery();
- if(ddgBox.lastQuery !== query && query !== '')
- ddgBox.hideZeroClick();
-
- if(options.dev)
- console.log(e.keyCode);
-
- var direct = false;
- if(e.keyCode == 40 || e.keyCode == 38)
- direct = true;
-
- clearTimeout(ddg_timer);
- ddg_timer = setTimeout(function(){
- qsearch(direct);
- }, 700);
-
- });
-
- window.$('[name="go"]').click(function(){
- qsearch();
- });
-
-}, false);
-
-opera.extension.onmessage = function(event){
- if (event.data.query) {
- ddgBox.renderZeroClick(event.data.result, event.data.query);
- } else if (event.data.topic === 'LoadedInjectedCSS' && event.data.data.path === path && !cssInjected) {
- // Remove the message listener so it doesn't get called again.
-
- var css = event.data.data.css;
-
- // Create a <style> element and add it to the <head> element of the current page.
- // Insert the contents of the stylesheet into the <style> element.
- var style = document.createElement('style');
- style.setAttribute('type', 'text/css');
- style.appendChild(document.createTextNode(css));
- document.getElementsByTagName('head')[0].appendChild(style);
- cssInjected = true;
- }
-}
-
-var ddg_timer;
-
-function getQuery(direct) {
- var instant = document.getElementsByClassName("gssb_a");
- if (instant.length !== 0 && !direct){
- var selected_instant = instant[0];
-
- var query = selected_instant.childNodes[0].childNodes[0].childNodes[0].
- childNodes[0].childNodes[0].childNodes[0].innerHTML;
- query = query.replace(/<\/?(?!\!)[^>]*>/gi, '');
-
- if(options.dev)
- console.log(query);
-
- return query;
- } else {
- return document.getElementsByName('q')[0].value;
- }
-}
-
-function qsearch(direct) {
- var query = getQuery(direct);
- ddgBox.lastQuery = query;
- ddgBox.search(query);
-}
-
-
-
-ddgBox.init();
-
View
120 includes/_04_google.js
@@ -1,120 +0,0 @@
-// ==UserScript==
-// @include http://google.*/*
-// @include http://encrypted.google.com/*
-// @include https://google.*/*
-// @include https://encrypted.google.com/*
-// ==/UserScript==
-
-/*
- * Copyright (C) 2012 DuckDuckGo, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var options = widget.preferences;
-console.log = opera.postError;
-
-var ddgBox = new DuckDuckBox('q', ['isr_pps'], 'center_col', true);
-
-ddgBox.search = function(query) {
-
- opera.extension.postMessage({ query: query });
-
- if (options.dev)
- console.log("query:", query);
-}
-
-var cssInjected = false;
-var path = 'css/google.css';
-window.addEventListener('DOMContentLoaded', function() {
-
- // Specify the path to the stylesheet here:
-
- opera.extension.postMessage({
- topic: 'LoadInjectedCSS',
- data: path
- });
-
- // instant search
- window.$('[name="q"]').keyup(function(e){
- var query = getQuery();
- if(ddgBox.lastQuery !== query && query !== '')
- ddgBox.hideZeroClick();
-
- if(options.dev)
- console.log(e.keyCode);
-
- var direct = false;
- if(e.keyCode == 40 || e.keyCode == 38)
- direct = true;
-
- clearTimeout(ddg_timer);
- ddg_timer = setTimeout(function(){
- qsearch(direct);
- }, 700);
-
- });
-
- window.$('[name="btnG"]').click(function(){
- qsearch();
- });
-
-}, false);
-
-opera.extension.onmessage = function(event){
- if (event.data.query) {
- ddgBox.renderZeroClick(event.data.result, event.data.query);
- } else if (event.data.topic === 'LoadedInjectedCSS' && event.data.data.path === path && !cssInjected) {
- // Remove the message listener so it doesn't get called again.
-
- var css = event.data.data.css;
-
- // Create a <style> element and add it to the <head> element of the current page.
- // Insert the contents of the stylesheet into the <style> element.
- var style = document.createElement('style');
- style.setAttribute('type', 'text/css');
- style.appendChild(document.createTextNode(css));
- document.getElementsByTagName('head')[0].appendChild(style);
- cssInjected = true;
- }
-}
-
-
-var ddg_timer;
-
-function getQuery(direct) {
- var instant = document.getElementsByClassName("gssb_a");
- if (instant.length !== 0 && !direct){
- var selected_instant = instant[0];
-
- var query = selected_instant.childNodes[0].childNodes[0].childNodes[0].
- childNodes[0].childNodes[0].childNodes[0].innerHTML;
- query = query.replace(/<\/?(?!\!)[^>]*>/gi, '');
-
- if(options.dev)
- console.log(query);
-
- return query;
- } else {
- return document.getElementsByName('q')[0].value;
- }
-}
-
-function qsearch(direct) {
- var query = getQuery(direct);
- ddgBox.lastQuery = query;
- ddgBox.search(query);
-}
-
-ddgBox.init();
-
View
103 index.html
@@ -1,103 +0,0 @@
-<!doctype html>
-<html lang="en">
- <head>
- <script>
- var UIItemProperties = {
- disabled: false,
- title: 'DuckDuckGo Popup Toolbar',
- icon: 'img/icon_18.png',
- popup: {
- href: 'html/popup.html',
- width: 520,
- height: 220
- },
- badge: {}
- };
-
- var button = opera.contexts.toolbar.createItem(UIItemProperties);
- // resetting the last search on browser startup
- localStorage['last_search'] = '';
-
- // add button just if the user really wants it
- if (widget.preferences['popup'] === 'true')
- opera.contexts.toolbar.addItem(button);
-
- function loadInjectedCSS(event, path) {
- // Try to get the contents of the stylesheet.
- var req = new XMLHttpRequest();
- req.open('GET', path, false);
- req.send();
-
- // Error check for reading the stylesheet.
- if (!req.responseText) {
- opera.postError('EXTENSION ERROR: Can\'t read ' + path);
- return;
- }
-
- // Send the contents of the stylesheet to the injected script.
- event.source.postMessage({
- topic: 'LoadedInjectedCSS',
- data: {
- css: req.responseText,
- path: path
- }
- });
- }
-
- window.addEventListener("load", function(){
- //var theButton;
- //var ToolbarUIItemProperties = {
- // title: "DuckDuckGo Toolbar",
- // icon: "hello-button.png",
- // popup: {
- // href: "popup.html",
- // width: 110,
- // height: 30
- // }
- //}
- //theButton = opera.contexts.toolbar.createItem(ToolbarUIItemProperties);
- //opera.contexts.toolbar.addItem(theButton);
- opera.extension.onmessage = function(event){
- if (event.data.query) {
-
- if (widget.preferences['zeroclickinfo'] === 'false') {
- event.source.postMessage({result: '', query: event.data.query });
- return;
- }
-
- var xhr=new XMLHttpRequest();
- var url = 'https://api.duckduckgo.com?q=' + encodeURIComponent(event.data.query) + '&format=json';
-
- if (widget.preferences['meanings'] !== 'true')
- url += '&d=1';
-
- xhr.open('GET', url, true);
- xhr.onreadystatechange = function(data) {
- if (xhr.readyState != 4) { return; }
- var res = JSON.parse(xhr.responseText);
- event.source.postMessage({result: res, query: event.data.query });
- }
- xhr.send();
- } else if (event.data.topic == 'LoadInjectedCSS') {
- loadInjectedCSS(event, event.data.data);
- } else if (event.data.tab) {
- opera.postError(event.data.tab);
- var tab = opera.extension.tabs.create({url: event.data.tab, focused: true});
- } else if (event.data.log) {
- opera.postError(event.data.log);
- } else if (event.data.maximize) {
- button.popup.height = 220;
- } else if (event.data.minimize) {
- button.popup.height = 60;
- } else if (event.data.installPopup) {
- opera.contexts.toolbar.addItem(button);
- } else if (event.data.uninstallPopup) {
- opera.contexts.toolbar.removeItem(button);
- }
- }
- }, false);
- </script>
- </head>
- <body>
- </body>
-</html>
View
99 js/background.js
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2012 DuckDuckGo, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+function Background()
+{
+ $this = this;
+
+ // clearing last search on borwser startup
+ localStorage['last_search'] = '';
+
+ var curr_version = chrome.app.getDetails().version;
+ var prev_version = localStorage['prev_version'];
+
+ if (prev_version === undefined) {
+ chrome.tabs.create({'url': "https://duckduckgo.com/extensions/thanks/"});
+ } else if (prev_version !== curr_version) {
+ chrome.tabs.create({'url':
+ "https://duckduckgo.com/extensions/thanks/?from=" + prev_version + "&to="
+ + curr_version});
+ }
+ localStorage['prev_version'] = curr_version;
+
+ chrome.extension.onMessage.addListener(function(request, sender, callback){
+ console.log(request);
+ if(request.query)
+ return $this.query(request.query, callback);
+ if (request.options) {
+ callback(localStorage);
+ }
+
+ if (request.selection) {
+
+ }
+
+ if (request.current_url) {
+ chrome.tabs.getSelected(function(tab) {
+ console.log(tab);
+ var url = tab.url;
+ callback(url);
+ });
+ }
+
+ return true;
+ });
+
+// this.menuID = chrome.contextMenus.create({
+// "title" : "Ask the duck",
+// "type" : "normal",
+// "contexts" : ["selection"],
+// "onclick" : function() {
+// console.log('clicked!!!');
+// }
+// });
+}
+
+Background.prototype.query = function(query, callback)
+{
+ var req = new XMLHttpRequest();
+ if (localStorage['zeroclickinfo'] === 'true') {
+ if(localStorage['meanings'] === 'true')
+ req.open('GET', 'https://chrome.duckduckgo.com?q=' + encodeURIComponent(query) + '&format=json', true);
+ else
+ req.open('GET', 'https://chrome.duckduckgo.com?q=' + encodeURIComponent(query) + '&format=json&d=1', true);
+ } else {
+ callback(null);
+ return;
+ }
+
+ req.onreadystatechange = function(data) {
+ if (req.readyState != 4) { return; }
+ var res = JSON.parse(req.responseText);
+ callback(res);
+ }
+
+ req.send(null);
+ return true;
+}
+
+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);
+ });
+});
View
107 js/bing.js
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2012 DuckDuckGo, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var options = {};
+var ddgBox;
+chrome.extension.sendMessage({options: "get"}, function(opt){
+ for (var option in opt) {
+ options[option] = (opt[option] === 'true') ? true : false;
+ }
+ ddgBox = new DuckDuckBox({
+ inputName: 'q',
+ hover: false,
+ contentDiv: 'results_container',
+ className: 'bing'
+ });
+
+ ddgBox.search = function(query) {
+ var request = {query: query};
+ chrome.extension.sendMessage(request, function(response){
+ ddgBox.renderZeroClick(response, query);
+ return true;
+ });
+
+ if (options.dev)
+ console.log("query:", query);
+ }
+
+ ddgBox.init();
+
+});
+
+ddgBox.search = function(query) {
+var request = {query: query};
+ chrome.extension.sendMessage(request, function(response){
+ ddgBox.renderZeroClick(response, query);
+ });
+
+ if (options.dev)
+ console.log("query:", query);
+}
+
+var ddg_timer;
+
+function getQuery(direct) {
+ var instant = document.getElementsByClassName("gssb_a");
+ if (instant.length !== 0 && !direct){
+ var selected_instant = instant[0];
+
+ var query = selected_instant.childNodes[0].childNodes[0].childNodes[0].
+ childNodes[0].childNodes[0].childNodes[0].innerHTML;