From c769184c4fa3ecdf2f69cd298d275ab0f8b293f8 Mon Sep 17 00:00:00 2001 From: n Date: Wed, 14 Oct 2020 00:12:16 +0200 Subject: [PATCH] initial import --- README.md | 8 ++++ clickat.meta | 1 + clickat.php | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 README.md create mode 100644 clickat.meta create mode 100644 clickat.php 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; +} +