Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var scroll = document.querySelector('div.uiLayer div[role=dialog] div.uiScrollableAreaWrap');
- var lastScroll = -1;
- var it = 0;
- var INTERVAL = window.setInterval(function() {
- console.log(it);
- if (it >= 7)
- {
- window.clearInterval(INTERVAL);
- console.log('FINISH; START INVITING');
- var invites = document.querySelectorAll('div[role=dialog] div.uiScrollableAreaWrap a[ajaxify*="invite"]');
- for (var i=0; i < invites.length; ++i) invites[i].click()
- }
- if (scroll.scrollTop == lastScroll)
- {
- console.log('equal');
- it += 1;
- }
- else
- it = 0
- lastScroll = scroll.scrollTop;
- var seeMore = document.querySelector('#reaction_profile_pager .uiMorePagerPrimary');
- if (seeMore) seeMore.click();
- scroll.scrollTop += 1000;
- }, 700);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement