Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
DDGG: Duck Duck Go + Google Suggest in Danish
<?xml version="1.0"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Duck Duck Go + Google Suggest</ShortName>
<Description>Duck Duck Go + Google Suggest</Description>
<Image height="16" width="16" type="image/x-icon">http://duckduckgo.com/favicon.ico</Image>
<Url type="text/html" method="get" template="http://duckduckgo.com/?q={searchTerms}"/>
<Url type="application/x-suggestions+json" template="http://google.com/complete/search?output=firefox&amp;q={searchTerms}&amp;hl=da"/>
<Url rel="suggestions" type="application/x-suggestions+xml" template="http://google.com/complete/search?q={searchTerms}&amp;client=ie8&amp;mw={ie:maxWidth}&amp;sh={ie:sectionHeight}&amp;rh={ie:rowHeight}&amp;inputencoding={inputEncoding}&amp;outputencoding={outputEncoding}&amp;hl=da" />
</OpenSearchDescription>
<!DOCTYPE html>
<html>
<head>
<title>Danish Duck Duck Go + Google Suggest OpenSearch Plugin</title>
<link rel="search" id="xml-direct" type="application/opensearchdescription+xml" title="Direct Duck Duck Go + Google Suggest (Danish)" href="https://raw.github.com/gist/2624238/b3a4c9219df6ad575a60286fe80a7b8ea8c9a673/ddg-google-da.xml" >
</head>
<body>
<h1>Danish Duck Duck Go + Google Suggest OpenSearch Plugin</h1>
<p>Install via the search box or <a href="#">click here</a>.</p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
function installSearchEngine(url) {
if (window.external && ("AddSearchProvider" in window.external)) {
window.external.AddSearchProvider( url );
} else {
alert("your browser doesn't appear to support installing opensearch plugins via javascript");
}
}
$(document).ready(function(){
$('a').click(function(){
installSearchEngine( $('#xml-direct').attr("href") );
});
}
</script>
</body>
</html>
@nfriedly

This comment has been minimized.

Copy link
Owner Author

@nfriedly nfriedly commented May 6, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.