1 | #! perl |
1 | #! perl |
2 | |
2 | |
3 | #:META:X_RESOURCE:%.cmd:string:the command to run create a new pastebin |
3 | #:META:RESOURCE:%.cmd:string:the command to run create a new pastebin |
4 | #:META:X_RESOURCE:%.url:string:the url template for new pastebins |
4 | #:META:RESOURCE:%.url:string:the url template for new pastebins |
5 | |
5 | |
6 | =head1 NAME |
6 | =head1 NAME |
7 | |
7 | |
8 | selection-pastebin - automatic pastebin upload |
8 | selection-pastebin - automatic pastebin upload |
9 | |
9 | |
… | |
… | |
113 | }; |
113 | }; |
114 | |
114 | |
115 | () |
115 | () |
116 | } |
116 | } |
117 | |
117 | |
118 | sub on_user_command { |
118 | sub on_action { |
119 | my ($self, $cmd) = @_; |
119 | my ($self, $action) = @_; |
120 | |
120 | |
121 | if ($cmd eq "selection-pastebin:remote-pastebin") { |
121 | $action eq "remote-pastebin" |
122 | $self->upload_paste; |
122 | and $self->upload_paste; |
123 | } |
|
|
124 | |
123 | |
125 | () |
124 | () |
126 | } |
125 | } |
127 | |
126 | |