zeroclickinfo-goodies/lib/DDG/Goodie/ScreenResolution.pm

30 lines
681 B
Perl
Raw Normal View History

package DDG::Goodie::ScreenResolution;
# ABSTRACT: Return the current screen resolution using javascript
use DDG::Goodie;
use strict;
zci answer_type => "screen_resolution";
zci is_cached => 1;
2015-06-21 11:45:36 -07:00
triggers startend => "screen resolution", "display resolution", "resolution of my screen";
handle remainder => sub {
2015-06-21 11:45:36 -07:00
return unless /^((what\'?s|what is)?\s?(the|my|current))?$/;
2015-07-08 17:57:28 -07:00
return undef, structured_answer => {
data => {
title => "Your screen resolution is [Loading...]"
},
templates => {
2015-06-24 08:49:05 -07:00
group => 'icon',
item => 0,
options => {
moreAt => 0
}
}
};
};
1;