الأربعاء، 8 مارس 2023
Show HN: Delete All Your Tweets https://ift.tt/Szs4vKQ
Show HN: Delete All Your Tweets To use it, go to your Twitter timeline then go to "tweets" tab to delete all tweets, OR go to "replies" tab to delete replies. Paste the following code into the browser JavaScript console. DISCLAIMER! This code deletes all your Tweets - I am not responsible for you deleting all your Tweets. Make sure you set your twitter handle in the code before pasting it! // IMPORTANT IMPORTANT IMPORTANT - SET YOUR TWITTER HANDLE IN THE NEXT LINE! // IMPORTANT IMPORTANT IMPORTANT - SET YOUR TWITTER HANDLE IN THE NEXT LINE! const yourTwitterHandle = "@yourtwitterhandle"; // one every 10 seconds to avoid Twitter noticing const waitTimeSeconds = 10 const sleep = async (seconds) => new Promise(resolve => setTimeout(resolve, seconds * 1000)); const main = async () => { while (true) { await walkTweets(); await sleep(waitTimeSeconds) } } const walkTweets = async () => { let articles = document.getElementsByTagName('article'); for (article of articles) { const spanElements = article.querySelectorAll('span'); for (spanElement of spanElements) { // delete if it is a retweet if (spanElement.textContent === "You Retweeted") { article.scrollIntoView(); try { const retweetElement = article.querySelector('[data-testid="unretweet"]'); if (retweetElement) { retweetElement.click(); document.querySelector('[data-testid="unretweetConfirm"]').click(); } } catch (e) {} return } if (spanElement.textContent === yourTwitterHandle) { // in this case it might be a tweet or a reply article.scrollIntoView(); try { // try to delete a reply const tweetReplyElement = article.querySelectorAll('[aria-label="More"]')[1]; if (tweetReplyElement) { tweetReplyElement.click() Array.from(document.getElementsByTagName('*')).find(el => el.textContent.trim() === 'Delete').click() document.querySelector('[data-testid="confirmationSheetConfirm"]').click(); return } } catch (e) {} try { // try to delete a tweet const tweetElement = article.querySelector('[aria-label="More"]'); if (tweetElement) { article.scrollIntoView(); tweetElement.click() Array.from(document.getElementsByTagName('*')).find(el => el.textContent.trim() === 'Delete').click() document.querySelector('[data-testid="confirmationSheetConfirm"]').click(); return } } catch (e) {} } } } } main() March 9, 2023 at 03:03AM
الاشتراك في:
تعليقات الرسالة (Atom)
������ �����
خدمات طبيه https://www.cut-titles.com/Y4ZR
-
Медицинскийуризм в Турции Турция занимает 3е место в мире по количеству иностранных пациентов согласно отчету Глобального ал...
-
Show HN: A Network of Knowledge Feeds Hi Everyone, I wanted to talk to this community about a particular story from my experience to see how...
-
Show HN: Full text search on 630M US court cases https://ift.tt/qs0bXYy February 19, 2022 at 10:45PM
-
Show HN: A WYSIWYM Markdown editor and brainstorming tool on the web https://ift.tt/yj6vCnJ July 31, 2022 at 09:18PM
-
Show HN: All-in-one open source tool for data pipelines https://ift.tt/EU7SnGz September 29, 2022 at 12:06AM
-
Show HN: Strada – Embed accounting automation with one API Hi HN, we’ve been working on an API that makes it easy to add a full set of accou...