Bonjour à tous.

Comment modifier l'id free_play_form_button et sa fonction (event) suivants pour que le temps et le compteur soit à 2 secondes au lieu d'une (1) heure comme il l'est dans le Code JS ci-dessous ???

Sachant que ce Code dispose d'un appel AJAX $.post (voir à partir de la Ligne 33 et 34):

Points ou fonctions importants (es) à modifier :

  1. title_countdown
  2. setTimeout(function()
  3. remaining
  4. time_remaining


Lignes Intéressantes Concernées:

  • Ligne 45 à 65
  • Ligne 72 à 75
  • Ligne 82 à 89
  • Ligne 118 à 120


VOICI MON CODE JS QUE JE CHERCHE A MODIFIER :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
$("#free_play_form_button").click(function(event) {
    event.preventDefault();
    $('#free_play_digits').show();
    $('.free_play_element').hide();
    var fingerprint = $.fingerprint();
    var fingerprint2 = new Fingerprint({
        canvas: true,
        screen_resolution: true,
        ie_activex: true
    }).get();
    var token = $("#free_play_form").find('[name="' + token_name + '"]').val();
    var intervalID = setInterval(function() {
        $("#free_play_first_digit").html(Math.floor(Math.random() * 10));
        $("#free_play_second_digit").html(Math.floor(Math.random() * 10));
        $("#free_play_third_digit").html(Math.floor(Math.random() * 10));
        $("#free_play_fourth_digit").html(Math.floor(Math.random() * 10));
        $("#free_play_fifth_digit").html(Math.floor(Math.random() * 10));
    }, 10);
	
    $("#free_play_form_button").attr("disabled", true);
    $("html, body").animate({
        scrollTop: $("#free_play_digits").offset().top - 50
    }, "fast");
    var post_variables = {
        op: 'free_play',
        fingerprint: fingerprint,
        client_seed: $('#next_client_seed').val(),
        fingerprint2: fingerprint2
    };
    post_variables[token_name] = token;
    post_variables[tcGiQefA] = window[tcGiQefA];

    var posting = $.post('/', post_variables);
    posting.done(function(data) {
        var result = data.split(":");
        clearInterval(intervalID);
        $("#free_play_first_digit").html(0);
        $("#free_play_second_digit").html(0);
        $("#free_play_third_digit").html(0);
        $("#free_play_fourth_digit").html(0);
        $("#free_play_fifth_digit").html(0);
        if (result[0] == "e") {
            $('#free_play_digits').hide();
            $('.free_play_element').show();
            if (result[3] == "e1") {
                $('.free_play_element').hide();
                $('#wait').show();
                $('#time_remaining').countdown({
                    until: +result[2],
                    format: 'MS'
                });
                setTimeout(function() {
                    RefreshPageAfterFreePlayTimerEnds();
                }, parseInt(result[2]) * 1000);
                title_countdown(parseInt(result[2]));
            }
        } else if (result[0] == "s") {
            var number = result[1];
            var single_digit = number.split("");
            if (number.toString().length < 5) {
                var remaining = 5 - number.toString().length;
                for (var i = 0; i < remaining; i++) {
                    single_digit.unshift('0');
                }
            }
            $("#free_play_first_digit").html(single_digit[0]);
            $("#free_play_second_digit").html(single_digit[1]);
            $("#free_play_third_digit").html(single_digit[2]);
            $("#free_play_fourth_digit").html(single_digit[3]);
            $("#free_play_fifth_digit").html(single_digit[4]);
            $.cookie.raw = true;
            $.cookie('last_play', result[4], {
                expires: 3650,
                secure: true
            });
            $.removeCookie('ivp7GpJPvMtG');
            $('.free_play_element').hide();
            $('#free_play_result').show();
            $('#wait').show();
            $('#balance').html(result[2]);
            balanceChanged();
            $('#time_remaining').countdown({
                until: +3600,
                format: 'MS'
            });
            setTimeout(function() {
                RefreshPageAfterFreePlayTimerEnds();
            }, 3600 * 1000);
            title_countdown(3600);
            free_play_claim_amount = parseFloat(Math.round(result[3] * 100000000) / 100000000).toFixed(8);
            $('#winnings').html(free_play_claim_amount);
            $('#balance_usd').html(result[5]);
            $('#next_server_seed_hash').val(result[6]);
            $('#next_nonce').html(result[8]);
            $('.previous_server_seed').html(result[9]);
            $('#previous_server_seed_hash').val(result[10]);
            $('.previous_client_seed').html(result[11]);
            $('.previous_nonce').html(result[12]);
            $('#previous_roll').html(result[1]);
            $('#no_previous_rolls_msg').hide();
            $('#previous_rolls_table').show();
            $('#previous_roll_strings').show();
            $("#verify_rolls_link").attr("href", "" + result[9] + "&client_seed=" + result[11] + "&server_seed_hash=" + result[10] + "&nonce=" + result[12]);
            $('#user_lottery_tickets').html(ReplaceNumberWithCommas(result[13]));
            $('.user_reward_points').html(ReplaceNumberWithCommas(result[14]));
            $('#fp_lottery_tickets_won').html(result[15]);
            $('#fp_reward_points_won').html(result[16]);
            $('#fp_multiplier_bonus').html(result[17]);
            $('#fp_bonus_req_completed').html(result[18]);
            if (parseInt(result[1]) < 9997) {
                var fp_win_amt = 20;
                if (parseInt(result[1]) < 9999) {
                    fp_win_amt = 200;
                }
                $('#make_extra_5_msg').show();
                $('#fp_forum_msg').html('I just won $' + fp_win_amt + ' at FreeBitco.in!

My user id is ' + socket_userid + '.

My winning seeds: ' + "" + result[9] + "&client_seed=" + result[11] + "&server_seed_hash=" + result[10] + "&nonce=" + result[12]);
            }
            setTimeout(function() {
                $('.show_multiply_modal').click();
            }, 2000);
        }
        $("#free_play_form_button").attr("disabled", false);
    });
});
SANS OUBLIER que ce Code contient un Appel AJAX $.post (voir à partir de la Ligne 33 et 34), Comment donc modifier le Code JS ci-dessus pour réévaluer aux temps et au compteur juste après le Clique à 2 secondes au lieu d'une (1) heure ???

D'avance merci.