commit c769184c4fa3ecdf2f69cd298d275ab0f8b293f8 Author: n Date: Wed Oct 14 00:12:16 2020 +0200 initial import diff --git a/README.md b/README.md new file mode 100644 index 0000000..02c3dcc --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +## ClickAt + +[Shaarli](https://github.com/shaarli/Shaarli/) plugin to make Twitter and Fediverse addresses clickable. + +# Manual + +1. Activate plugin. +2. Quote users from Twitter with their @nic, and users from the Fediverse with @nic@server. diff --git a/clickat.meta b/clickat.meta new file mode 100644 index 0000000..3bc366f --- /dev/null +++ b/clickat.meta @@ -0,0 +1 @@ +description="Make Twitter and Fediverse addresses clickable." diff --git a/clickat.php b/clickat.php new file mode 100644 index 0000000..c1295b2 --- /dev/null +++ b/clickat.php @@ -0,0 +1,115 @@ +@\1',$value['description']); + $value['description'] = preg_replace('/@([\w\d]+)/','@\1',$value['description']); + } + + return $data; +} +