Thread:Andrewds1021/@comment-45117243-20201111034700/@comment-9605025-20201203093755

Wow! I did some testing and came to post within minutes of you posting your reply.

Great news! It looks like the service issues are gone now; at least for now. While I was testing, I noticed that my script successfully completed all 118 requests (10 notifs each) on UCP and all 24 requests (50 notifs each) on legacy!

Instead of String.prototype.includes, I prefer to check the value returned by String.prototype.indexOf. But as I said, that is just a pet peeve of mine.

Given the URLs that appear to be currently used by Fandom's scripts, I guess the only thing you really need to check for is the request type. That can be done using (using the available variables in your code) options.type. The issue is I am not sure the capitalization of the string in Fandom's requests. Though I suppose you could always just convert the case before comparison.

That said, I am someone that just doesn't like leaving open doors when I know I can close them. If you checked for the URL to start with https://services.fandom.com/on-site-notifications/notifications? then that would do 2 things. First, it would prevent matching any URL that has this URL in its query string. I am not sure why it would be in one but you never know. Second, we know the additional requests have to use the query string so checking for "?" at the end is a safe way to ensure that "/unread-count" (or anything else) isn't also in the path.