line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::WidgetValidator::Widget::Digg;
|
2
|
1
|
|
|
1
|
|
6
|
use base qw(HTML::WidgetValidator::Widget);
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
77
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
5
|
1
|
|
|
1
|
|
6
|
use Carp;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
414
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
__PACKAGE__->name('Digg');
|
8
|
|
|
|
|
|
|
__PACKAGE__->url('http://digg.com/add-digg');
|
9
|
|
|
|
|
|
|
__PACKAGE__->models([
|
10
|
|
|
|
|
|
|
[ { type=>'start', name=>'script',
|
11
|
|
|
|
|
|
|
attr => { type => 'text/javascript', }, },
|
12
|
|
|
|
|
|
|
{ type=>'text',
|
13
|
|
|
|
|
|
|
text=> qr{\s*(?:digg_width\s*=\s*'\d+px';\s*|digg_height\s*=\s*'\d+px';\s*|digg_border\s*=\s*\d+;\s*|digg_count\s*=\s*\d+;\s*|digg_description\s*=\s*\d+;\s*|digg_target\s*=\s*\d+;\s*|digg_theme\s*=\s*'digg-widget-[a-z0-9]+';\s*|digg_custom_header\s*=\s*'#[0-9A-Fa-f]{3,6}';\s*|digg_custom_border\s*=\s*'#[0-9A-Fa-f]{3,6}';\s*|digg_custom_link\s*=\s*'#[0-9A-Fa-f]{3,6}';\s*|digg_custom_hoverlink\s*=\s*'#[0-9A-Fa-f]{3,6}';\s*|digg_custom_footer\s*=\s*'#[0-9A-Fa-f]{3,6}';\s*|digg_title\s*=\s*'[^'<>]+';\s*)+\s*} },
|
14
|
|
|
|
|
|
|
{ type => 'end', name=>'script' } ],
|
15
|
|
|
|
|
|
|
[ { type => 'start', name=>'script',
|
16
|
|
|
|
|
|
|
attr => {
|
17
|
|
|
|
|
|
|
type => 'text/javascript',
|
18
|
|
|
|
|
|
|
src => 'http://digg.com/tools/widgetjs',
|
19
|
|
|
|
|
|
|
}},
|
20
|
|
|
|
|
|
|
{ type => 'end', name=>'script' } ],
|
21
|
|
|
|
|
|
|
[ { type => 'start', name=>'script',
|
22
|
|
|
|
|
|
|
attr => {
|
23
|
|
|
|
|
|
|
type => 'text/javascript',
|
24
|
|
|
|
|
|
|
src => qr{http://digg\.com/tools/services\?type=javascript&callback=diggwb&endPoint=[a-z0-9/]+(?:&domain=[A-Za-z0-9\-\.]+)?(?:&sort=[a-z\-_]+)?&count=\d{1,2}},
|
25
|
|
|
|
|
|
|
}},
|
26
|
|
|
|
|
|
|
{ type => 'end', name=>'script' } ],
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
]);
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1;
|
31
|
|
|
|
|
|
|
__END__
|