Greasy Fork is available in English.

X to Twitter

Get our Twitter back from Elon.

< Feedback on X to Twitter

Soru/yorum

§
Gönderildi: 28.07.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.

yakisova41Sahip
§
Gönderildi: 28.07.2023

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

§
Gönderildi: 28.07.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.

Cevap paylaş

Yanıt göndermek için oturum açın.