Created
December 8, 2015 11:12
-
-
Save varlen/376afb63378754d9b64e to your computer and use it in GitHub Desktop.
Write the email then inject this JavaScript on the page to schedule an email submission.
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
// No Gmail, o ID do botao sempre muda quando a pagina é atualizada | |
// Mudar o id na linha abaixo | |
btnElementID = ''; | |
btn = document.getElementById(btnElementID); | |
intervalID = window.setInterval( function checkTime() { | |
// https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Date | |
var send_on = new Date( 2015,11,8,6,0 ); | |
var now = new Date(); | |
if ( now.getTime() > send_on.getTime() ) { | |
console.info( 'Mandei!' ); // Sent | |
btn.click(); | |
window.clearInterval( intervalID ); | |
} else { | |
console.log( 'Ainda não ( '+ send_on +' ) > ( ' + now +' )'); // Not sent yet | |
} | |
}, 5000 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment