Skip to content

Instantly share code, notes, and snippets.

View anton-roos's full-sized avatar
🎯
Focusing

Anton Roos anton-roos

🎯
Focusing
View GitHub Profile
@anton-roos
anton-roos / delete-my-tweets-from-tweets-and-replies.js
Created April 9, 2022 13:02
Delete your tweets from Tweets & replies with JavaScript
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
async function deleteTweets() {
let tweets = document.querySelectorAll('[data-testid="tweet"]');
for (let tweet of tweets) {
// Replace "Your Display Name"
if (tweet.querySelector("span:first-child").innerHTML.includes("Your Display Name")) {
console.log("My tweet");
tweet.querySelectorAll('[data-testid="caret"]')[0].scrollIntoView();
@anton-roos
anton-roos / unlike-all-tweets.js
Last active April 9, 2022 13:35
Bulk unlike tweets with JavaScript
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
async function unlikeTweets() {
let tweets = document.querySelectorAll('[data-testid="tweet"]');
for (let tweet of tweets) {
let unlikeButton = tweet.querySelectorAll('[data-testid="unlike"]')[0];
if (unlikeButton != null) {
unlikeButton.scrollIntoView();
unlikeButton.click();
@anton-roos
anton-roos / git-config.sh
Created August 13, 2022 07:38
git-config
# Set local git config
git config user.name "Your Name Here"
git config user.email your@email.example
# Set global git config
git config --global user.name "Your Name Here"
git config --global user.email your@email.example
# Check your git settings
git config user.name && git config user.email