X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=nsfw%2FREADME;h=e4a8b9d3188a0eef11fd71c4fce0b0a754580691;hb=HEAD;hp=cf2dc2623384c9e434c3d0b739c7ccf7dd1679d5;hpb=ce7b6d6bb268ccfe712e115c09c8c59502952ea2;p=friendica-addons.git diff --git a/nsfw/README b/nsfw/README index cf2dc262..e4a8b9d3 100644 --- a/nsfw/README +++ b/nsfw/README @@ -6,3 +6,92 @@ 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' addon 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))?/ + + +ATTENTION: + +It is absolutely important, that you use grouping +parentheses instead of capturing parentheses!! + +Grouping parentheses are: + + (?: ) + +If you use capturing parentheses, which are + + ( ) + +it will produce errors and the regex won't work and +at least your targets will not get collapsed. + + + +3) +Another possibility is the usage of a so called +'lookbehind' construct. I'll give an example followed +by a descripton: + + /(?