Remove User ID from Stack Overflow Share URLs

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

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Necesitará instalar una extensión como Tampermonkey para instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

Autor
Kevin Locke
Instalaciones diarias
0
Instalaciones totales
32
Calificaciones
0 0 0
Versión
1.0.1
Creado
9/9/2018
Actualizado
29/8/2019
Tamaño
3,05 KB
Licencia
MIT
Funciona en

StackOverflow Share Remove User ID Userscript

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.

Features

  • Removes the User ID from both question and answer URLs.
  • Re-selects the URL text after changing to preserve copy behavior.
  • Only removes the User ID from recognized URL formats. If URL formats change, there should be no risk of removing non-User ID URL parts.

Installation

This userscript can be installed by following the instructions to install in Greasemonkey, install in Tampermonkey, or install in any other userscript manager using:

https://raw.githubusercontent.com/kevinoid/stackoverflow-share-remove-user-id/master/stackoverflow-share-remove-user-id.user.js

Contributing

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.

License

This project is available under the terms of the MIT License.