This file contains 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 condition = ''; // eg. '<some-content>' | |
const targetClassToFindInfo = ''; // Eg '.tweet-text' | |
$('li.js-stream-item').each(function(index, tweet) { | |
const text = $(tweet).find(".content " + targetClassToFindInfo)[0].innerText; | |
if(text.indexOf(condition) > 0) { | |
$(tweet).find('.js-actionDelete').click(); | |
$('.delete-action').click(); | |
} | |
}); |
This file contains 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
// Simulate click behaviour based on x, y coordinates | |
function click(x, y) { | |
let elm = document.querySelector("canvas.ZRgdub"); | |
let ev = document.createEvent("MouseEvents"); | |
ev.initMouseEvent( "click", true, true, window, | |
0, 0, 0, x, y, | |
false, false, false, false, | |
0, null | |
); | |
elm.dispatchEvent(ev); |
This file contains 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
{ | |
"random": [ | |
"https://picsum.photos/id/1005/1920/480.jpg", | |
"https://picsum.photos/id/1011/1920/480.jpg", | |
"https://picsum.photos/id/1012/1920/480.jpg", | |
"https://picsum.photos/id/1015/1920/480.jpg", | |
"https://picsum.photos/id/1024/1920/480.jpg", | |
"https://picsum.photos/id/10/1920/480.jpg" | |
] | |
} |