Skip to content

Instantly share code, notes, and snippets.

View hisivasankar's full-sized avatar

Sivasankar hisivasankar

  • Bangalore
View GitHub Profile
@hisivasankar
hisivasankar / DeleteTweets.js
Created June 10, 2019 13:05
Delete Tweets based on some condition
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();
}
});
@hisivasankar
hisivasankar / google-holi-2020-automation.js
Last active March 10, 2020 12:07
Playing Google Holi 2020 - Automation
// 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);