Test RP

Test RP123

Dieses Skript sollte nicht direkt installiert werden. Es handelt sich hier um eine Bibliothek für andere Skripte, welche über folgenden Befehl in den Metadaten eines Skriptes eingebunden wird // @require https://update.greasyfork.org/scripts/49593/277194/Test%20RP.js

var MIN = 15; // số phút tối thiểu để auto rp
var MAX = 30; // số phút tối đa auto rp
var RANDOM_THOI_GIAN_CLICK = true; //giả lập click giống con người bằng cách random thời gian click


function randomize(a,b) {
    if (!RANDOM_THOI_GIAN_CLICK) {return 0;}
    return Math.floor(Math.random() * (b-a)) + a;
}

function showMessage() {
    $('._5cl4').html("Đã report xong, anh em không cần nhấn <b>Done</b>, tab sẽ tự động report lại sau " + THOI_GIAN_REPORT + " phút. Để chỉnh lại thời gian, xem ở <a target='_blank' href='https://i.imgur.com/4qH45MI.png'>đây</a>");
    $('._5cl4').css({"font-size": "18px","color": "red", "text-align": "center","line-height": "1.4"});
}

var intv;
var intv2;
//reports personal accounts
if(/100004302963345/i.test(window.location.href)){
    console.log('Reporting group function initializing');
    $(document).arrive('#pagelet_group_actions i', function(){
        setTimeout(function() {
            intv = setInterval(function(){$('#pagelet_group_actions i').click();},1000);
            $(document).unbindArrive('#pagelet_group_actions i');
        },randomize(200,1100));
    });

    $(document).arrive('._54nc[href^="/ajax/report.php"] span', function(){
        clearInterval(intv);
        setTimeout(function() {
            $('._54nc[href^="/ajax/report.php"] span').click();
            $(document).unbindArrive('._54nc[href^="/ajax/report.php"] span');
        },randomize(1200,2100));
    });
    $(document).arrive('#nfxQuestionNamedhate span', function(){
        setTimeout(function() {
            $('#nfxQuestionNamedhate span').click();
            setTimeout(function() {
                $('#nfx_dialog_continue').click();
            },randomize(1200,2100));
            $(document).unbindArrive('#nfxQuestionNamedhate span');
        },randomize(1200,2100));
    });
    $(document).arrive('#nfxQuestionNamedrace span', function(){
        setTimeout(function() {
            $('#nfxQuestionNamedrace span').click();
            setTimeout(function() {
                $('#nfx_dialog_continue').click();
            },randomize(1200,2100));
            $(document).unbindArrive('#nfxQuestionNamedrace span');
        },randomize(1200,2100));
    });
    $(document).arrive('._16gh[ajaxify^="/ajax/feed/filter_action/nfx_action_execute?action_name=REPORT"] span', function(){
        setTimeout(function() {
            intv2 = setInterval(function(){$('._16gh[ajaxify^="/ajax/feed/filter_action/nfx_action_execute?action_name=REPORT"] span').click();showMessage();},1000);
            setTimeout(function(){clearInterval(intv2);},2100);
        },randomize(200,1100));
    });
}