Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1081 from duckduckgo/jag/quixey
Browse files Browse the repository at this point in the history
Quixey: add a function toHTTPS
  • Loading branch information
bsstoner committed Sep 12, 2014
2 parents b9fd961 + 3ed5a1c commit 273b01b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion share/spice/quixey/quixey.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,15 @@
item.boost = true;
}

// This converts URLs that start with HTTP to HTTPS.
// We need to use this for the images because they currently redirect two
// times. Jumping straight to HTTPS would reduce that to one.
function toHTTPS(url) {
return url.replace(/^http:/, "https:");
}

return {
'img': icon_url,
'img': toHTTPS(icon_url),
'title': item.name,
'heading': item.name,
'rating': item.rating,
Expand Down

0 comments on commit 273b01b

Please sign in to comment.