summaryrefslogtreecommitdiff
path: root/plugins/nsfw
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-15 19:42:48 +0300
committerAndrew Dolgov <[email protected]>2021-03-15 19:42:48 +0300
commita0ce7f556b41e9fa0683076174b3c12f58178296 (patch)
treef7bab0e4a5411f3f7d42397ccfe86bf576fb7a10 /plugins/nsfw
parent1664b8782186dcfc343e47425b8bd157e59b3edc (diff)
nsfw: set cursor pointer
Diffstat (limited to 'plugins/nsfw')
-rw-r--r--plugins/nsfw/init.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/nsfw/init.php b/plugins/nsfw/init.php
index 0d876c423..fc38fef71 100644
--- a/plugins/nsfw/init.php
+++ b/plugins/nsfw/init.php
@@ -36,12 +36,20 @@ class NSFW extends Plugin {
$article_tags = $article["tags"];
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;
}
+ function get_css() {
+ return
+ 'details.nsfw {
+ cursor : pointer;
+ user-select : none;
+ }';
+ }
+
function hook_render_article_api($row) {
$article = isset($row['headline']) ? $row['headline'] : $row['article'];
return $this->rewrite_contents($article);