מדיה ויקי:Gadget-rcPatrol.js: הבדלים בין גרסאות בדף
שינוי - אם המשתמש מסמן כבדוק לפני שהסקריפט קיבל אסימון אז הסקריפט ימתין לאסימון (עד 10 שניות) ואז יסמן כבדוק |
תיקון - לא אמור להיות ID זהה לאלמנטים שונים. + בדיקה |
||
| שורה 10: | שורה 10: | ||
if ( !tick ) rcspan.innerHTML = '<font color="orange">מסמן...</font> '; | if ( !tick ) rcspan.innerHTML = '<font color="orange">מסמן...</font> '; | ||
if ( !window.mypatroltoken ) | if ( !window.mypatroltoken ) // token not known yet | ||
{ | { | ||
if ( tick < 200 ) setInterval( function() { rcMarkPatrol( rcspan, id, tick+1 ); }, 50 ); // wait 10 seconds for the token | if ( tick < 200 ) setInterval( function() { rcMarkPatrol( rcspan, id, tick+1 ); }, 50 ); // wait 10 seconds for the token | ||
| שורה 16: | שורה 16: | ||
return; | return; | ||
} | } | ||
if ( rcspan.patrolstarted ) return; | |||
rcspan.patrolstarted = true; | |||
var a = sajax_init_object(); | var a = sajax_init_object(); | ||
| שורה 95: | שורה 98: | ||
var rcspan = document.createElement('SPAN'); | var rcspan = document.createElement('SPAN'); | ||
rcspan. | rcspan.className = 'rcspan'; | ||
rcspan.appendChild(checkbox); | rcspan.appendChild(checkbox); | ||
unpatrolled[0].style.display = "none"; | unpatrolled[0].style.display = "none"; | ||