Last active
January 15, 2019 22:06
-
-
Save fakefarm/aab9ff4858bf269502f2 to your computer and use it in GitHub Desktop.
Use skills to network skills.
This file contains 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
// endorse page | |
function endorse_people() { | |
$('.endorse-skills').click(); | |
window.setInterval(endorse, 1200); | |
function endorse() { | |
$('#endorsements-connections') | |
.find('.endorse-action') | |
.first() | |
.trigger('click'); | |
} | |
} | |
endorse_people(); | |
// Stats page | |
function stats_stuff() { | |
var i; | |
function box(index) { | |
return $('#recommended-actions > ul > li:nth-child(' + index + ') > ul > li.action-card.show > div > button'); | |
} | |
function push_buttons () { | |
if ( typeof(i) === "undefined" ) { i = 1 } | |
var $box = box(i), | |
$box_text = $box.text(); | |
setInterval( | |
push_non_edit_buttons($box) | |
, 500); | |
} | |
function push_non_edit_buttons(box) { | |
if ( !/Edit/.test( box.text() ) ) { | |
box.click() | |
} else { | |
i += 1; | |
push_buttons; | |
} | |
} | |
setInterval( | |
push_buttons | |
, 1000); | |
setInterval( | |
stats_stuff | |
, 5000); | |
} | |
stats_stuff() | |
// Like people's postings | |
function get_all_page_likes() { | |
var $likes; | |
function get_bottom() { | |
var $height = $(document).height(); | |
$("html,body").scrollTop($height) | |
} | |
var bottom = setInterval( | |
get_bottom | |
, 2100 ) | |
window.setTimeout( | |
stop, | |
5000 | |
) | |
function stop () { | |
window.clearInterval(bottom) | |
like_stuff() | |
} | |
function like_stuff() { | |
$likes = $('.like'); | |
$.each( $likes, function(i, value) { | |
var $value = $(value); | |
if( !/Unlike/.test($value.text()) ) { | |
$value.click(); | |
} | |
}); | |
} | |
}; | |
get_all_page_likes() | |
// group likes | |
function like_group_page_posts() { | |
var $likes; | |
function get_bottom() { | |
var $height = $(document).height(); | |
$("html,body").scrollTop($height) | |
} | |
var bottom = setInterval( | |
get_bottom | |
, 2100 ) | |
window.setTimeout( | |
stop, | |
5000 | |
) | |
function stop () { | |
window.clearInterval(bottom) | |
like_stuff() | |
} | |
function like_stuff() { | |
$likes = $('.like-button'); | |
$.each( $likes, function(i, value) { | |
var $value = $(value); | |
if( !/Unlike/.test($value.text()) ) { | |
$value.click(); | |
} | |
}); | |
} | |
}; | |
like_group_page_posts() | |
// connect with people | |
function connect() { | |
var c = $('.js-mn-discovery-person-card__action-btn'); | |
$.each(c, function(i,j) { | |
$(j).click(); | |
}) | |
} | |
setTimeout( | |
connect | |
, 300); | |
Author
fakefarm
commented
Feb 22, 2016
- how can I add a full page reload and make the script keep running?
- post screenshot results.
- make a chrome plugin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment