… | |
… | |
33 | } |
33 | } |
34 | }); |
34 | }); |
35 | }; |
35 | }; |
36 | |
36 | |
37 | for ($text) { |
37 | for ($text) { |
|
|
38 | $add_button->("rot13" => sub { y/A-Za-z/N-ZA-Mn-za-m/ }); |
|
|
39 | |
38 | /^(\S+):(\d+):?$/ |
40 | /^(\S+):(\d+):?$/ |
39 | and $add_button->("vi-commands to load '$1'" => sub { s/^(\S+):(\d+):?$/\x1b:e $1\x0d:$2\x0d/ }); |
41 | and $add_button->("vi-commands to load '$1'" => sub { s/^(\S+):(\d+):?$/\x1b:e $1\x0d:$2\x0d/ }); |
|
|
42 | |
40 | /%[0-9a-fA-F]{2}/ && !/%[^0-9a-fA-F]/ && !/%.[^0-9a-fA-F]/ |
43 | /%[0-9a-fA-F]{2}/ && !/%[^0-9a-fA-F]/ && !/%.[^0-9a-fA-F]/ |
41 | and $add_button->("uri unescape" => sub { s/%([0-9a-fA-F]{2})/chr hex $1/ge }); |
44 | and $add_button->("uri unescape" => sub { s/%([0-9a-fA-F]{2})/chr hex $1/ge }); |
|
|
45 | |
42 | /^(http|ftp|telnet|irc|news):\// |
46 | /^(http|ftp|telnet|irc|news):\// |
43 | and $add_button->("run x-www-browser" => sub { system "x-www-browser \Q$_\E &" }); |
47 | and $add_button->("run x-www-browser" => sub { system "x-www-browser \Q$_\E &" }); |
44 | } |
48 | } |
45 | |
49 | |
46 | $popup->show; |
50 | $popup->show; |