Removes the User ID from the URL displayed by the "Share" button for questions and answers on Stack Overflow and related sites. For a description of why the User ID was added, see https://meta.stackoverflow.com/q/277769
A userscript (viz. Greasemonkey/Tampermonkey/Violentmonkey script) to remove the User ID from short URLs displayed by the "Share" button on Stack Overflow and other Stack Exchange sites.
Important: The User ID is used to attribute links to your user account for badges. Removing it will remove the link attribution and prevent you from obtaining those badges.
Given the above restriction, why would someone want to remove the User ID? For me, the value of shorter, anonymous, user-invariant URLs far outweighs the value of link attribution. Others may have specific tools or use cases for Stack Overflow URLs which expect a certain format.
This userscript can be installed by following the instructions to install in Greasemonkey, install in Tampermonkey, or install in any other userscript manager using:
Contributions are welcome and very much appreciated! Please add tests where
possible and ensure npm test
passes.
If the desired change is large, complex, backwards-incompatible, can have significantly differing implementations, or may not be in scope for this project, opening an issue before writing the code can avoid frustration and save a lot of time and effort.
This project is available under the terms of the MIT License.