Skip to content
This repository has been archived by the owner on Jan 10, 2019. It is now read-only.

Commit

Permalink
Fixed definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
mrshu committed Feb 4, 2012
1 parent f1604ad commit 1002fd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/script.js
Expand Up @@ -118,7 +118,7 @@ function displaySummary(res, query) {


for (var i = 0; i < res['RelatedTopics'].length; i++){
if (i > 1)
if (i > 1 || res['RelatedTopics'].length === 0)
break;

var link = res['RelatedTopics'][i]['Result'].
Expand All @@ -129,11 +129,13 @@ function displaySummary(res, query) {
'</div>';
}

first_category += '<div id="ddg_zeroclick_more">' +
if (res['RelatedTopics'].length !== 0) {
first_category += '<div id="ddg_zeroclick_more">' +
'<a href="https://duckduckgo.com/?q='+
encodeURIComponent(query)
+'"> More at DuckDuckGo </a>' +
'</div>';
}

result += '<div id="ddg_zeroclick_header">' +
'<a href="' + res['AbstractURL'] + '">'+
Expand Down
2 changes: 0 additions & 2 deletions src/style.css
Expand Up @@ -43,8 +43,6 @@
#ddg_zeroclick_abstract {
padding: 5px 7px 5px 15px;
word-wrap: break-word;
min-height: 105px;
width: 75%;
}

#ddg_zeroclick_abstract a{
Expand Down

0 comments on commit 1002fd9

Please sign in to comment.