nsfw: set cursor pointer
This commit is contained in:
parent
1664b87821
commit
a0ce7f556b
|
@ -36,12 +36,20 @@ class NSFW extends Plugin {
|
||||||
$article_tags = $article["tags"];
|
$article_tags = $article["tags"];
|
||||||
|
|
||||||
if (count(array_intersect($tags, $article_tags)) > 0) {
|
if (count(array_intersect($tags, $article_tags)) > 0) {
|
||||||
$article["content"] = "<details><summary>" . __("Not safe for work (click to toggle)") . "</summary>" . $article["content"] . "</details>";
|
$article["content"] = "<details class='nsfw'><summary>" . __("Not safe for work (click to toggle)") . "</summary>" . $article["content"] . "</details>";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $article;
|
return $article;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_css() {
|
||||||
|
return
|
||||||
|
'details.nsfw {
|
||||||
|
cursor : pointer;
|
||||||
|
user-select : none;
|
||||||
|
}';
|
||||||
|
}
|
||||||
|
|
||||||
function hook_render_article_api($row) {
|
function hook_render_article_api($row) {
|
||||||
$article = isset($row['headline']) ? $row['headline'] : $row['article'];
|
$article = isset($row['headline']) ? $row['headline'] : $row['article'];
|
||||||
return $this->rewrite_contents($article);
|
return $this->rewrite_contents($article);
|
||||||
|
|
Loading…
Reference in New Issue