DEV Community

Bune Bim
Bune Bim

Posted on

RTP LIVE

`var lastTime = localStorage.getItem(provider+"_lastTime");
  var currentTime = new Date().getTime();

  var time_rand = [300000, 360000, 420000, 480000, 540000, 600000, 660000, 720000, 780000, 840000, 900000];
  var random_time = (Math.floor(Math.random() * time_rand.length-1) + 1);

  var time_to_refresh = localStorage.getItem(provider+"_time_to_refresh") == null ? time_rand[random_time] : localStorage.getItem(provider+"_time_to_refresh");
  if (localStorage.getItem(provider+"_time_to_refresh") == null) {localStorage.setItem(provider+"_time_to_refresh", time_to_refresh);}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)