Last active
December 29, 2017 17:04
-
-
Save ionox0/40f7ec374a5599c3249912f0e070305d to your computer and use it in GitHub Desktop.
Auto populate list for sending donation requests email
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
var emails = ['[email protected]'] | |
var $ = jQuery; | |
var one = $('#msg_cat_wizard_add_contacts')[0] | |
var four = $('#email-wizard-add-contact-email')[0]; | |
async function doit(email) { | |
one.click(); | |
four.value = email; | |
var five = $( "button:contains('Add')" )[5]; | |
five.click(); | |
await sleep(2000); | |
} | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
for (var i = 0; i < emails.length; i++) { | |
email = emails[i]; | |
doit(email); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment