mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Avoid multiple call on the same selector
This commit is contained in:
parent
664bf03b09
commit
7b80eb3001
1 changed files with 3 additions and 2 deletions
|
@ -1263,10 +1263,11 @@ function validURL(str) {
|
|||
function isURL(url) {
|
||||
return validURL(url);
|
||||
}
|
||||
|
||||
var startTimerInterval = [];
|
||||
function startTimer(duration, selector) {
|
||||
clearInterval(startTimerInterval[selector]);
|
||||
var timer = duration;
|
||||
var startTimerInterval = setInterval(function () {
|
||||
startTimerInterval[selector] = setInterval(function () {
|
||||
|
||||
// Time calculations for days, hours, minutes and seconds
|
||||
var years = Math.floor(duration / (60 * 60 * 24 * 365));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue