简体   繁体   中英

how to bypass or edit timer in javascript

i found a website and they use this code to hide picture

$(function() {
    $('.play_timer').hide();
    var countDownDate = 1590392954000;
    if(countDownDate === 0 || countDownDate === "0"){
        countDownDate = new Date().getTime();
    }
    var x = setInterval(function() {
        var now = new Date().getTime();
        var distance = countDownDate - now;
        var seconds = Math.floor((distance % (1000 * 60)) / 1000);

        document.getElementById("timer").innerHTML = seconds + "s  left to see picture!";
        if (distance < 0) {

            document.getElementById("timer").innerHTML = "";
            $('.play_timer').show();
        }else{
            $('.play_timer').hide();
        }
    }, 1000);

my problem is there any javascript code that can i paste in chrome console so i would not wait 30 sec to view each picture

You can achieve this (ie persist modified JavaScript code) using Chrome's Local Overrides .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM