Last active
October 18, 2019 11:32
-
-
Save said-and-done/07b3f2fe1d9d4947691dbc1a29bf056d to your computer and use it in GitHub Desktop.
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
let subscribers = ['[email protected]', '[email protected]']; | |
let count = subscribers.length; | |
let current = 0; | |
let URL = 'https://newsletter.services.tv2.dk/api/unsubscribe'; | |
let unsub = (mail) => { | |
$.post(URL, { | |
"email": mail, | |
"subscribers": ["opx-moneytalks"], | |
}, | |
(resp) => { | |
console.log('unsubscribed: %s (%s/%s)', mail, ++current, count); | |
}); | |
}; | |
(function f() { | |
if (!subscribers.length) | |
return; | |
unsub(subscribers.pop()); | |
setTimeout(f, 200); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment