53 |
|
|
54 |
my $path = template_path( $c->req->path ); |
my $path = template_path( $c->req->path ); |
55 |
|
|
56 |
|
if ( $path =~ m{/__bookmarklet} ) { |
57 |
|
$c->res->content_type( "text/html" ); |
58 |
|
my $js = read_file( 'static/xpath.js' ); |
59 |
|
$js =~ s{//.*}{}gm; # remove comments so that compaction below doesn't screw code |
60 |
|
$js =~ s/\s\s+/ /gs; |
61 |
|
$c->res->body(qq{ |
62 |
|
drag this look to bookmark <a href="javascript:void($js);">xpath?</a> to install XPATH inspector |
63 |
|
<p><a href="http://www.google.com/">link test</a> |
64 |
|
}); |
65 |
|
return; |
66 |
|
} |
67 |
|
|
68 |
$path .= '.html' if $path !~ m/\.\w+$/; |
$path .= '.html' if $path !~ m/\.\w+$/; |
69 |
|
|
70 |
my $url = $self->uri; |
my $url = $self->uri; |