forked from Elv1zz/ttrss_plugin-markasread
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.php
More file actions
41 lines (31 loc) · 936 Bytes
/
init.php
File metadata and controls
41 lines (31 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
class MarkAsRead extends Plugin {
private $host;
function about() {
return array(
0.2,
"Google Reader like 'Mark as read' checkbox",
"Elvizz",
false,
"https://github.com/Elv1zz/ttrss_plugin-markasread"
);
}
function init($host) {
$this->host = $host;
$host->add_hook($host::HOOK_ARTICLE_BUTTON, $this);
}
function api_version() {
return 2;
}
function get_js() {
return file_get_contents(dirname(__FILE__) . "/markasread.js");
}
function get_css() {
return file_get_contents(dirname(__FILE__) . "/markasread.css");
}
function hook_article_button($line) {
$myId = $line["id"];
return "<span style='cursor: pointer; vertical-align: bottom;' onclick='markasreadClicked(event,$myId);'><span style='min-width: 15px; min-height: 15px;' class='markasread'><img src='plugins/markasread/trans.png' class='tagsPic' width=15 height=15 /></span>".__('Mark as read')."</span>";
}
}
?>