]> git.wh0rd.org Git - tt-rss.git/blob - plugins/close_button/init.php
Merge branch 'master' of git://github.com/skikuta/Tiny-Tiny-RSS into skikuta-master
[tt-rss.git] / plugins / close_button / init.php
1 <?php
2 class Close_Button extends Plugin {
3         private $link;
4         private $host;
5
6         function init($host) {
7                 $this->link = $host->get_link();
8                 $this->host = $host;
9
10                 $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this);
11         }
12
13         function about() {
14                 return array(1.0,
15                         "Adds a button to close article panel",
16                         "fox");
17         }
18
19         function hook_article_button($line) {
20                 if (!get_pref($this->link, "COMBINED_DISPLAY_MODE")) {
21                         $rv = "<img src=\"plugins/close_button/button.png\"
22                                 class='tagsPic' style=\"cursor : pointer\"
23                                 onclick=\"closeArticlePanel()\"
24                                 title='".__('Close article')."'>";
25                 }
26
27                 return $rv;
28         }
29 }
30 ?>