Last active
September 22, 2019 16:48
-
-
Save dvygolov/f9ea4d982f7b59790bb939f88c10bee3 to your computer and use it in GitHub Desktop.
Скрипт приглашения людей лайкать Фан Пейдж
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
javascript: (function () { | |
var btn=document.querySelector('a._2x4v'); /*Щелкаем по кол-ву лайкнувших*/ | |
if (btn!=null){ | |
btn.click(); | |
} else{ | |
document.querySelector('a._3dlf').click(); | |
} | |
setTimeout(invite, 3000); | |
function invite() { | |
var loadMore = document.getElementsByClassName('pam uiBoxLightblue uiMorePagerPrimary'); | |
if (typeof loadMore[0] !== 'undefined') { | |
console.log("Раскрываем комменты..."); | |
loadMore[0].click(); | |
setTimeout(invite, 1000); /*check again in a second*/ | |
} else { | |
console.log("Раскрыли все комменты"); | |
var uiScrollable = document.getElementsByClassName('_4t2a')[2]; | |
var buttons = uiScrollable.querySelectorAll(':scope a._42ft._4jy0._4jy3._517h._51sy[rel=async-post]'); | |
var i = 1; | |
buttons.forEach(function (button) { | |
button.click(); | |
console.log("Приглашаем " + i); | |
i++; | |
}); | |
console.log("Закончили приглашать!"); | |
var likeCloseBnt = document.querySelectorAll('a._42ft._5upp._50zy.layerCancel._463u._51-t._50-0._50z-'); | |
likeCloseBnt[0].click(); | |
var postCloseBtn = document.querySelectorAll('button.layerCancel._51-t._50zy._50-0._50z-._5upp._42ft'); | |
postCloseBtn[0].click(); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment