Add more removal triggers to DuckDuckGo
parent
f4937bd29c
commit
028d4dc5d4
|
@ -25,6 +25,10 @@ my %data = (
|
|||
irc_html => "DuckDuckGo's official IRC channel is <a href='http://webchat.freenode.net/?channels=duckduckgo'>#duckduckgo</a> on <a href='http://freenode.net/'>irc.freenode.net</a>",
|
||||
remove => "To remove DuckDuckGo from your browser, take a look at https://duck.co/help/desktop. Let us know why you are leaving: https://duckduckgo.com/feedback",
|
||||
remove_html => qq(To remove DuckDuckGo from your browser, look <a href="https://duck.co/help/desktop">here</a> for your web browser.<br/>In short, check your browser's addons/extensions for DuckDuckGo, then check the search settings.<br/>Please <a href="https://duckduckgo.com/feedback">let us know</a> why you are leaving!),
|
||||
removing => \"remove",
|
||||
removing_html => \"remove_html",
|
||||
removal => \"remove",
|
||||
removal_html => \"remove_html",
|
||||
(map {
|
||||
$_ => "Zero Click Info is the term DuckDuckGo uses for these boxes, which often provide useful instant answers above traditional results.",
|
||||
} qw/zeroclickinfo zeroclick 0click 0clickinfo/),
|
||||
|
@ -48,7 +52,8 @@ handle query_lc => sub {
|
|||
s/\W//g;
|
||||
return if $_ eq 'irc';
|
||||
s/^?(?:ddg|duckduckgo)\$?|repo(?:sitory)?//g;
|
||||
return unless exists $data{$_} and my $answer = $data{$_};
|
||||
$_ = ${$data{$_}} if ref $data{$_};
|
||||
return unless my $answer = $data{$_};
|
||||
return $answer unless exists $data{"${_}_html"};
|
||||
return $answer, html => $data{"${_}_html"};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue