mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-01 16:17:13 +00:00
fix: removal of snowballing memory problems in JS countdowns
This commit is contained in:
@@ -132,7 +132,7 @@ window
|
|||||||
|
|
||||||
// IE MooTools Fix
|
// IE MooTools Fix
|
||||||
|
|
||||||
if (Browser.Engine.trident) // für IE
|
if (Browser.Engine.trident) // f�r IE
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -372,7 +372,7 @@ var BBEditor = new Class ({
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
* Fügt den klickbaren Objekten die Events hinzu
|
* F�gt den klickbaren Objekten die Events hinzu
|
||||||
|
|
||||||
*
|
*
|
||||||
|
|
||||||
@@ -402,7 +402,7 @@ var BBEditor = new Class ({
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
* Fügt einen ausgewählten Tag in die
|
* F�gt einen ausgew�hlten Tag in die
|
||||||
|
|
||||||
* Textarea ein
|
* Textarea ein
|
||||||
|
|
||||||
|
|||||||
@@ -62,12 +62,22 @@ executeCounter();}
|
|||||||
function executeCounter(){
|
function executeCounter(){
|
||||||
for(var i in ab){
|
for(var i in ab){
|
||||||
wb = db() - cb;
|
wb = db() - cb;
|
||||||
xb = rb(ab[i].counter_time + wb);
|
if (ab[i] && ab[i]['counter_time']) {
|
||||||
|
xb = rb(ab[i].counter_time + wb);
|
||||||
|
} else {
|
||||||
|
xb = 0;
|
||||||
|
}
|
||||||
ab[i].node.innerHTML = xb;
|
ab[i].node.innerHTML = xb;
|
||||||
}
|
}
|
||||||
for(i in bb){
|
for(i in bb){
|
||||||
wb = db() - cb;
|
wb = db() - cb;
|
||||||
yb = bb[i].counter_time - wb;
|
|
||||||
|
if (bb[i] && bb[i]['counter_time']) {
|
||||||
|
yb = bb[i].counter_time - wb;
|
||||||
|
} else {
|
||||||
|
eb = 0;
|
||||||
|
yb = -1;
|
||||||
|
}
|
||||||
// console.log('yb: ' + yb);
|
// console.log('yb: ' + yb);
|
||||||
if(eb == 0 && yb < 0){
|
if(eb == 0 && yb < 0){
|
||||||
bb[i] = null;
|
bb[i] = null;
|
||||||
@@ -86,9 +96,9 @@ function executeCounter(){
|
|||||||
xb=rb(yb);
|
xb=rb(yb);
|
||||||
bb[i].node.innerHTML = xb;
|
bb[i].node.innerHTML = xb;
|
||||||
}
|
}
|
||||||
if(eb == 0 && yb >= 0){
|
/*if(eb == 0 && yb >= 0){
|
||||||
setTimeout("executeCounter()",1000);
|
setTimeout("executeCounter()",1000);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
setTimeout("executeCounter()",1000);
|
setTimeout("executeCounter()",1000);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user