Skip to content

Instantly share code, notes, and snippets.

View jemikanegara's full-sized avatar

Jemika Negara jemikanegara

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jemikanegara on github.
  • I am jemikanegara (https://keybase.io/jemikanegara) on keybase.
  • I have a public key ASDcw-E0U1V-qal6mACrMqOG_9N33pqai3C5t-T6L9KxOQo

To claim this, I am signing this object:

@jemikanegara
jemikanegara / gist:ce9b7e291b96eaa2c973cdc895a83e95
Last active January 7, 2021 08:49
Delete all unread gmail
Search -> is:unread
const checkIcon = document.querySelector('.T-Jo')
const deleteIcon = document.querySelector('.nX')
// https://stackoverflow.com/questions/24025165/simulating-a-mousedown-click-mouseup-sequence-in-tampermonkey/24026594
function triggerMouseEvent (node, eventType) {
var clickEvent = document.createEvent ('MouseEvents');
clickEvent.initEvent (eventType, true, true);
node.dispatchEvent (clickEvent);