X to Twitter

Get our Twitter back from Elon.

< Feedback on X to Twitter

سوئال / ئىنكاس

§
يوللانغان ۋاقتى: 2023-08-09
تەھرىرلەنگەن ۋاقتى: 2023-08-09

This solution is far from ideal, but I couldn't figure out any other way that still caught all the usecases. Might play around later with the idea of stopping the interval once spanList stops changing, and running it again for every mouseclick or something.

function postChange() {
let spanList = document.querySelectorAll('span');
const j = setInterval(()=>{
for (let i = 0; i < spanList.length; i++) {
if (spanList.item(i).innerText == "Post"){
spanList.item(i).innerText = "Tweet";
}
else if(spanList.item(i).innerText == "© 2023 X Corp."){
spanList.item(i).innerText = "© 2023 Twitter";
}
}
spanList = document.querySelectorAll('span');
}, 500);
}

yakisova41ئاپتور
§
يوللانغان ۋاقتى: 2023-08-09

For English-speaking users, simply change "Post" to "Tweet". However, Twitter has many language versions, and it is difficult to support "Tweet" in all of them.

§
يوللانغان ۋاقتى: 2023-08-09

For English-speaking users, simply change "Post" to "Tweet".
However, Twitter has many language versions, and it is difficult to support "Tweet" in all of them.

Haven't even thought of that. For that you would need to have a 2D Array with the columns as (language, 'post' word, 'tweet' word) in order to look up what word to search for. Sounds like a lot of work to create that.

جاۋاب قايتۇرۇش

جاۋاب قايتۇرۇش ئۈچۈن كىرىش.

长期地址
遇到问题?请前往 GitHub 提 Issues。