Screenshot / Code Snippet
When using the Stack Exchange Data Explorer, one often needs to provide their own user ID as input parameter for the query. Formerly, this would be filled in automatically based on the user's email address, as the SEDE help page formerly stated:
##UserId##parameter is treated specially for users who are logged in. If they have an account on the target site that shares the email used in their Data Explorer account, their user ID on that site will be automatically populated.
However, this hasn't worked since 2013, as this used the user's Gravatar email hash in the database to fill in the user ID (it would get the ID of the user who shared the same hash with that of the SEDE account), and Gravatar hashes were removed from the public database for privacy reasons at that time.
This script aims to re-implement this former functionality, and as a bonus, it will autofill
AccountId parameters with your network account ID for cross-site queries. It also helps breaking the cache for specialized queries with
Developed and tested with Tampermonkey on Firefox; somehow it doesn't work with Violentmonkey.