From 11434f843a2fd6ffd2e076b6002c959ad001099a Mon Sep 17 00:00:00 2001 From: rebeka-catalina Date: Mon, 6 Nov 2017 09:44:10 +0100 Subject: [PATCH 1/2] Extended the NSFW's README with some use cases and regex examples --- nsfw/README | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/nsfw/README b/nsfw/README index cf2dc2623..c65394a8c 100755 --- a/nsfw/README +++ b/nsfw/README @@ -6,3 +6,74 @@ Scans the message content for the string 'nsfw' (case insensitive) and if found replaces the content with a "click to open/close" link, default is closed. +If you click on the 'Not safe for work' plugin under +/settings/addon a text field appears, where you can +extend the list of search terms. The terms must be +seperated by commas. + +It is also possible to enter profile URLs as values. +This is quite useful for the case, that you perhaps +don't want to see postings by person_A, but person_B +is one of your contacts and person_B used to reshare +postings by person_A. + +You can also make use of regular expressions. +They also have to be seperated by commas and the +regex itself has to be enclosed with slashes: + + ... nsfw, //, politics,... + +--------------- +A few examples: +--------------- + +1) +Let's say you don't want to see postings which contain +the term 'fake news' + +The term could appear in several ways: + +fakenews, fake news, fake_news, fake-news, f@ke news, +f4ke news, f4k3 n3ws, and so on and so on and so on. + +You could write every possible version of it as single +item into your NSFW-filter list, but this can also be +done with a single regex, which matches all of them: + + /f[@4a]k[3e][-_ ]n[3e]w[sz]/ + + +2) +Another use case could be, that you are simply not +interested in postings about christmas. + + /christmas([-_ ]?(tree|time|eve|pudding))?/ + + +3) +Another possibility is the usage of a so called +'lookbehind' construct. I'll give an example followed +by a descripton: + + /(? Date: Mon, 6 Nov 2017 09:58:47 +0100 Subject: [PATCH 2/2] Extended the NSFW's README with some use cases and regex examples - typo correction --- nsfw/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nsfw/README b/nsfw/README index c65394a8c..e42c2128c 100755 --- a/nsfw/README +++ b/nsfw/README @@ -64,7 +64,7 @@ This can be prevented by /\badvent\b/ -The first part if the regex above +The first part of the regex above (?