Board Thread:Support Requests - Getting Technical/@comment-31208684-20200902185621/@comment-9605025-20200902225055

Unfortunately I cannot provide you with information about that domain. I just copied those parts from Noreplyz's script.

The concern over spam has been voiced but feel free to send in your own feedback ticket. In fact, the concern over spam is one of the reasons they have disabled @mentions on article comments for now.

I did most of the development for this script prior to the release of the Feeds-based article comments, blog comments, and message walls. So none of those are intentionally included in the script. It also means that the script currently does not know how to handle notifications triggered by anons. Unfortunately, it will not be as easy to add these in. When writing the script, I was able to make use of the GitHub repository to view how things were structured. The repository for UCP is not yet public so I can't do the same.

The example configuration I gave blocks all @mentions from all wikis except those from specified wikis. However, you can configure the filters in a multitude of ways. I suppose I could give a detailed description of how the script works. I hope it makes sense. Here is a table describing the properties of a filter object.

* _ids and *_names are treated as a combined list. The purpose for having both is to allow users to specify using whichever method is most convenient. Since names can change, it is recommended to use IDs where possible. For the purposes of the rest of this post, I will refer to the effective combined lists as simply "wikis" and "users". I will also refer to settings. By this, I mean properties of the object "window.andrewds1021.ignore_notifications". A notification matches a filter if all of the following are true:


 * 1) the source wiki is listed in "wikis" or no wikis are listed
 * 2) no users are listed or
 * 3) *for a whitelist - at least one user in the notification is listed
 * 4) *for a blacklist - all users in the notification are listed
 * 5) the notification type is listed in "types" or no types are listed
 * 6) the notification does NOT match the exceptions or no exceptions are listed

An array of filters is matched if any of the individual filters are matched. When operating in blacklist mode (default), if a notification matches, it is dismissed (marked as read). When operating in whitelist mode, a notification is dismissed if it DOES NOT match.

The top-level filters should be placed in the setting "filters"; which expects either an individual filter or an array of filters. To treat them as a whitelist, set setting "whitelist" to "true". In case it wasn't obvious, exceptions to blacklist filters are treated as whitelists and exceptions to whitelist filters are treated as blacklists.

There is also the setting "hide". If this is set to "true", the script will insert CSS that will hide read messages and adjust the horizontal line placement as needed. This way, you will see only the notifications that you haven't read and that haven't been blocked.

The script has a built-in user whitelist to automatically allow notifications from users belonging to certain global user groups such as staff and wiki manager. Even if the user sets their script configuration to block one of these users, the notification should still be allowed through.