Skip to main content

Show HN: Delete All Your Tweets https://ift.tt/BMhUsiW

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 = "@yourhandle"; // 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 06:03AM

Comments

Popular posts from this blog

Show HN: Launch VM workloads securely and instantaneously, without VMs https://ift.tt/2QwJ1Kd

Show HN: Launch VM workloads securely and instantaneously, without VMs Hello HN! We've been working on a new hypervisor https://kwarantine.xyz that can run strongly isolated containers. This is still a WIP, but we wanted to give the community an idea about our approach, its benefits, and various use cases it unlocks. Today, VMs are used to host containers, and make up for the lack of strong security as well as kernel isolation in containers. This work adds this missing security piece in containers. We plan on launching a free private beta soon. Meanwhile, we'd deeply appreciate any feedback, and happy to answer any questions here or on our slack channel. Thanks! April 29, 2021 at 07:50AM

Show HN: Comment on live websites just like you comment on Google Docs/Figma https://ift.tt/GRhrjX0

Show HN: Comment on live websites just like you comment on Google Docs/Figma I'd love your feedback on this new JS plugin we launched. With this, you can comment on live websites just like you comment on Google Docs or Figma. You can use is to get Copy or UI feedback right on the website you are building. Feedback can be provided in rich formats like audio and video. You can get started by installing a JS tag in the footer of the website. You can then turn the review mode on or off on demand by adding “?review=true” to the URL. Demo video (43s): https://www.youtube.com/watch?v=cdnfBEw8TfI Demo video: https://www.youtube.com/watch?v=h6vxzXJuh8o https://ift.tt/ocLpdEu October 26, 2022 at 02:18AM