Greasy Fork is available in English.

X to Twitter

Get our Twitter back from Elon.

< Opiniones de X to Twitter

Pregunta o comentario

§
Publicado: 28/7/2023

The document title now keeps ending in " / X".
It wasn't easy to work out, but adding this to end works:

setTimeout(function(){
new MutationObserver(function(mutations) {
if (document.title.includes(" / X")) {
document.title = document.title.slice(0,-4);
}
}).observe(
document.querySelector('title'),
{ subtree: true, characterData: true, childList: true }
);
},1000)

No clue if this is the optimal way of doing things, but at least it's better than a setInterval loop.

yakisova41Autor
§
Publicado: 28/7/2023

I just made an update to fix that just a few minutes ago. But my code is more verbose than you code lol

§
Publicado: 28/7/2023

It's at least smarter. A setInterval until the title isn't null is way better than just a setTimeout.
I do personally prefer just getting rid of the end entirely instead of replacing it.
I can already tell it's Twitter by the logo, and I think it looks cleaner.

Publicar respuesta

Inicia sesión para responder.