グーグルでボロノイ図を表示するサンプル
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const timer = ms => new Promise(res => setTimeout(res, ms)); | |
setInterval(async () => | |
{ | |
const tweetsLikeButtonList = document.querySelectorAll('div[data-testid="unlike"]'); | |
console.log('****// ' + tweetsLikeButtonList.length + 'Like Found! //****') | |
for (const button of tweetsLikeButtonList) { | |
button.scrollIntoView(); | |
await button.click(); | |
console.log('****// Unliked //****'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const timer = ms => new Promise(res => setTimeout(res, ms)); | |
setInterval(async () => | |
{ | |
// Get all tweets | |
const allTweets = document.querySelectorAll('.css-1dbjc4n.r-18u37iz.r-1wbh5a2.r-13hce6t'); | |
// Filter tweets | |
const filteredTweets = Array.prototype.slice.call(allTweets).filter(x => x.innerText === '@{YOUR_TWITTER_NICKNAME}'); // --> e.g. '@twitter' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const timer = ms => new Promise(res => setTimeout(res, ms)); | |
// Unretweet normally | |
const unretweetTweet = async (tweet) => { | |
await tweet.querySelector('[data-testid="unretweet"]').click(); | |
await timer(250); | |
await document.querySelector('[data-testid="unretweetConfirm"]').click(); | |
console.log('****// Unretweeted Successfully //****') | |
} |