Skip to content

Instantly share code, notes, and snippets.

@AndrewCraswell
Created July 19, 2017 19:58
Show Gist options
  • Save AndrewCraswell/8ff237065477d6ab4623da35269f7536 to your computer and use it in GitHub Desktop.
Save AndrewCraswell/8ff237065477d6ab4623da35269f7536 to your computer and use it in GitHub Desktop.
Script to automatically share a OneWeek hackathon project. Each share is delayed by 50ms to not overload the server causing a crash. To modify the number of times shared, edit the number on line 14. Paste the script into a browser's developer console to execute.
(function (shares) {
var i = shares;
var delayInMilliseconds = 50;
var shareBtn = angular.element('.share-button > a');
shareBtn.attr('href', 'javascript:void(0);');
for (i = i; 0 < i; i--) {
setTimeout(function () {
shareBtn.click();
console.info('Share successful!');
}, i*delayInMilliseconds);
}
}(100)); // number of times to share
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment