Skip to content

Instantly share code, notes, and snippets.

Avatar

GroupUnknown™ groupunknown

View GitHub Profile
@groupunknown
groupunknown / bot.js
Created May 30, 2020
Bot comment facebook mobile
View bot.js
/**
* https://stackoverflow.com/a/62103618/9537649
* https://m.facebook.com/${author}/posts/${postId}
*/
function start() {
setTimeout(function() {
const rand = Math.floor(Math.random() * 767) + 1 + Math.random().toString(36).substr(2, 5);
document.querySelector("input[name='comment_text']").value = rand;
const submitButton = document.querySelector("button[name='submit']");
submitButton.disabled = false;
View verify_user_role_post_status.php
<?php
function get_user_role($id) {
$user = new WP_User($id);
return array_shift($user->roles);
}
function verify_user_role_post_status($user_role, $user_id) {
if (in_array($user_role, (array) 'subscriber')) {
auto_draft_posts_subscriber('draft', $user_id);