2015-06-02 17:50:50 -07:00
|
|
|
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";
|
2015-06-02 17:50:50 -07:00
|
|
|
|
|
|
|
handle remainder => sub {
|
2015-06-21 11:45:36 -07:00
|
|
|
return unless /^((what\'?s|what is)?\s?(the|my|current))?$/;
|
2015-06-02 17:50:50 -07:00
|
|
|
|
2015-07-08 17:57:28 -07:00
|
|
|
return undef, structured_answer => {
|
2015-06-02 17:50:50 -07:00
|
|
|
data => {
|
|
|
|
title => "Your screen resolution is [Loading...]"
|
|
|
|
},
|
|
|
|
templates => {
|
2015-06-24 08:49:05 -07:00
|
|
|
group => 'icon',
|
2015-06-02 17:50:50 -07:00
|
|
|
item => 0,
|
|
|
|
options => {
|
|
|
|
moreAt => 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
1;
|