Bush Toolkit - I needs your help :(

antisback

Head Gardener
Joined
Dec 14, 2007
Messages
429
soooo i'm trying to make my toolkit parse a spy report and label how many ticks have passed since the news happened

it parses the report counts the ticks adds it in fine but when it comes to putting it all back together the tables get mixed up - no matter what i do the stupid thing won't work, so you're all clever people, if anyone can help me solve it, i'll owe you many a sexual favour and my gratitude :)

Code:
function spyticks(){
	var season = getseason();
	var curtick = gettick();
	if (season == "Summer"){
		if(curtick == "Evening"){
			tick = 6;
		}else if(curtick == "Earlyhours"){
			tick = 1;
		}else if(curtick == "Dawn"){
			tick = 2;
		}else if(curtick == "Morning"){
			tick = 3;
		}else if(curtick == "Noon"){
			tick = 4;
		}else if(curtick == "Afternoon"){
			tick = 5;
		}
	}else if (season == "Winter"){
		if(curtick == "Evening"){
			tick = 5;
		}else if(curtick == "Earlyhours"){
			tick = 1;
		}else if(curtick == "Midnight"){
			tick = 6;
		}else if(curtick == "Morning"){
			tick = 2;
		}else if(curtick == "Afternoon"){
			tick = 3;
		}else if(curtick == "Dusk"){
			tick = 4;
		}
	}else{
		if(curtick == "Evening"){
			tick = 5;
		}else if(curtick == "Earlyhours"){
			tick = 1;
		}else if(curtick == "Midnight"){
			tick = 6;
		}else if(curtick == "Morning"){
			tick = 2;
   		}else if(curtick == "Afternoon"){
			tick = 4;
		}else if(curtick == "Noon"){
			tick = 3;
		}
	}
	report = content.document.getElementById('main-page-data').innerHTML;
	content.document.getElementById('main-page-data').innerHTML = report;
	//alert (report);
	var trs = report.split("</tr>");
	//alert (trs);
	xtotal = trs.length;
	var x = 0;
	for (x=0;x<=xtotal;x++){
		var str = trs[x];
		//alert (str);
		var patt1 = new RegExp("\<span title=");
		var result = patt1.test(str);
		if (result == true) {
	//get date
			document.getElementById('randomstoragebox').value = trs[x].match(/\<span\>(.)*\<span title=/g);
			var datews = document.getElementById('randomstoragebox').value;
			var date = datews.replace(/\,(.)*\<span title=/g,"").replace(/\<span\>/g,"").replace(/st/g,"").replace(/nd/g,"").replace(/rd/g,"").replace(/th/g,"");
			var dates = date.split(" ");
			if (dates[2]=="Dec") {
				var seas2 = "Winter";
				var month2 = "12";
			} else if (dates[2]=="Jan") {
				var seas2 = "Winter";
				var month2 = "1";
			} else if (dates[2]=="Feb") {
				var seas2 = "Winter";
				var month2 = "2";
			} else if (dates[2]=="Mar") {
				var seas2 = "Spring";
				var month2 = "3";
			} else if (dates[2]=="Apr") {
				var seas2 = "Spring";
				var month2 = "4";
			} else if (dates[2]=="May") {
				var seas2 = "Winter";
				var month2 = "5";
			} else if (dates[2]=="Jun") {
				var seas2 = "Summer";
				var month2 = "6";
			} else if (dates[2]=="Jul") {
				var seas2 = "Summer";
				var month2 = "7";
			} else if (dates[2]=="Aug") {
				var seas2 = "Summer";
				var month2 = "8";
			} else if (dates[2]=="Sept") {
				var seas2 = "Autumn";
				var month2 = "9";
			} else if (dates[2]=="Oct") {
				var seas2 = "Autumn";
				var month2 = "10";
			} else if (dates[2]=="Nov") {
				var seas2 = "Autumn";
				var month2 = "11";
			}
	//get time of day
			document.getElementById('randomstoragebox').value = trs[x].match(/\<span title=(.)*\<\/span\>/g);
			var todws = document.getElementById('randomstoragebox').value;
			var tod = todws.replace(/\<span title=(.)*\"\>/g,"").replace(/\<\/span\>/g,"");
	//Set Tick
			if (seas2 == "Summer"){
				if(tod == "Evening"){
					spytick = 6;
				} else if(tod == "Earlyhours"){
					spytick = 1;
				} else if(tod == "Dawn"){
					spytick = 2;
				} else if(tod == "Morning"){
					spytick = 3;
				} else if(tod == "Noon"){
					spytick = 4;
				} else if(tod == "Afternoon"){
					spytick = 5;
				}
			} else if (seas2 == "Winter"){
				if(tod == "Evening"){
					spytick = 5;
				} else if(tod == "Earlyhours"){
					spytick = 1;
				} else if(tod == "Midnight"){
					spytick = 6;
				} else if(tod == "Morning"){
					spytick = 2;
				} else if(tod == "Afternoon"){
					spytick = 3;
				} else if(tod == "Dusk"){
					spytick = 4;
				}
			} else {
				if(tod == "Evening"){
					spytick = 5;
				} else if(tod == "Earlyhours"){
					spytick = 1;
				} else if(tod == "Midnight"){
					spytick = 6;
				} else if(tod == "Morning"){
					spytick = 2;
	   			} else if(tod == "Afternoon"){
					spytick = 4;
				} else if(tod == "Noon"){
					spytick = 3;
				}
			}
	//get and set currentmonth
			var curmonth = getmonth();
			if (curmonth=="Dec"){
				var month = "12";
			} else if (curmonth=="Jan") {
				var month = "1";
			} else if (curmonth=="Feb") {
				var month = "2";
			} else if (curmonth=="Mar") {
				var month = "3";
			} else if (curmonth=="Apr") {
				var month = "4";
			} else if (curmonth=="May") {
				var month = "5";
			} else if (curmonth=="Jun") {
				var month = "6";
			} else if (curmonth=="Jul") {
				var month = "7";
			} else if (curmonth=="Aug") {
				var month = "8";
			} else if (curmonth=="Sept") {
				var month = "9";
			} else if (curmonth=="Oct") {
				var month = "10";
			} else if (curmonth=="Nov") {
				var month = "11";
			}
	//begin adding up the ticks
			var tickscount = parseInt(getdate()) * 6;
			var datescount = parseInt(dates[1]) * 6;
			var tickcount = parseInt(tickscount) - parseInt(datescount);
			var i=0;
			while (i != 1){
				if(month2 != month){
					if(month2 == 1){
						tickcount2 = parseInt(tickcount) + 186;
						tickcount = tickcount2;
					} else if(month2 == 2){
						tickcount2 = parseInt(tickcount) + 168;
						tickcount = tickcount2;
					} else if(month2 == 3){
						tickcount2 = parseInt(tickcount) + 186;
						tickcount = tickcount2;
					} else if(month2 == 4){
						tickcount2 = parseInt(tickcount) + 180;
						tickcount = tickcount2;
					} else if(month2 == 5){
						tickcount2 = parseInt(tickcount) + 186;
						tickcount = tickcount2;
					} else if(month2 == 6){
						tickcount2 = parseInt(tickcount) + 180;
						tickcount = tickcount2;
					} else if(month2 == 7){
						tickcount2 = parseInt(tickcount) + 186;
						tickcount = tickcount2;
					} else if(month2 == 8){
						tickcount2 = parseInt(tickcount) + 186;
						tickcount = tickcount2;
					} else if(month2 == 9){
						tickcount2 = parseInt(tickcount) + 180;
						tickcount = tickcount2;
					} else if(month2 == 10){
						tickcount2 = parseInt(tickcount) + 186;
						tickcount = tickcount2;
					} else if(month2 == 11){
						tickcount2 = parseInt(tickcount) + 180;
						tickcount = tickcount2;
					} else if(month2 == 12){
						tickcount2 = parseInt(tickcount) + 186;
						tickcount = tickcount2;
					}
					month3 = parseInt(month2) + 1;
					month2 = month3;
					if (month2 == 13){
						month2 = 1;
					}
				} else {
					i=1;
				}
			}
			var tickmod = tick - spytick;
			var tickcounter = tickcount + tickmod;
			if(tickcounter == 0){
				var newtr = trs[x].replace(/\<\/span\>\<\/span\>/g,"</span></span> <span class=\"friendly\">This Tick</span>");
			} else {
				var newtr = trs[x].replace(/\<\/span\>\<\/span\>/g,"</span></span> <span class=\"friendly\">"+tickcounter+" Ticks Ago</span>");
			}
		} else {
			var newtr = trs[x];
		}
//put back together
		if(x == 0){
			content.document.getElementById('main-page-data').innerHTML = newtr;
		} else {
			var olddata = content.document.getElementById('main-page-data').innerHTML;
			//alert (olddata);
			var newdata = olddata +"</tr>"+ newtr;
			//alert (newdata);
			content.document.getElementById('main-page-data').innerHTML = newdata;
		}
	}
}

And attached is the screenshot of how it turns out

as i say any help will be much appreciated so i can finally finish the toolkit once and for all :p
 

Attachments

  • painscreenie.jpg
    painscreenie.jpg
    92.3 KB · Views: 1

Weeble

Community Manager
Administrator
Joined
Dec 13, 2007
Messages
869
Location
UK
You got any HTML output to check out? Might give you a few clues!
 

antisback

Head Gardener
Joined
Dec 14, 2007
Messages
429
Input Array comma's are transformed to </tr>
Code:
<!-- Header file ends here --><table width="100%" align="center">
<tbody><tr>
<td class="header" colspan="3" width="100%" align="center">
<a name="Top">Reports</a>
</td>
,
<tr>
<form name="FilterFromB" method="get" action="news.php"></form>
<td width="30%" align="left" nowrap="nowrap">
Filter by ID: <input name="MFrom" size="5" maxlength="5" value="0" type="text"><input name="Submit" value="Show" type="submit">
</td>

<td class="title" width="40%" align="center" nowrap="nowrap">
1  <a href="news.php?Page=2&RF=1246430509">2</a>  <a href="news.php?Page=3&RF=1246430509">3</a>  <a href="news.php?Page=4&RF=1246430509">4</a>  <a href="news.php?Page=5&RF=1246430509">5</a>  <a href="news.php?Page=6&RF=1246430509">6</a>  <a href="news.php?Page=7&RF=1246430509">7</a>  <a href="news.php?Page=8&RF=1246430509">8</a>  <a href="news.php?Page=9&RF=1246430509">9</a>  </td>
<form method="post" action="actions/news_hide.php"></form>
<input name="TS" value="1246430612" type="hidden">
<td width="30%" align="right" nowrap="nowrap">
<input name="Submit" value="Hide All" onclick="return confirm('Are you sure you wish to hide all your news?')" type="submit">
</td>

,
</tbody></table>
<table width="100%" align="center">
<form method="post" name="mainform" action="actions/news_hide.php"></form>
<tbody><tr>
<td colspan="3" width="100%" align="right">
<input name="Submit" value="Hide Checked" type="submit">
</td>
,
<tr>
<td colspan="3" class="title" width="100%" align="right">
<a id="CheckAllLink" onclick="CheckAll();" href="#">Check All</a>
</td>
,
<tr>
<td class="lightheader" valign="top" align="left">
<span>Sat 31st Aug, year 4. <span title="Day time">Morning</span></span>
</td>
<td class="lightheader" valign="top" align="left">
<span>Hack detected</span>
</td>
<td class="lightheader" valign="top" width="1%" align="right" nowrap="nowrap">
<span><input id="NewsItem_1304" name="D1304" value="Y" type="checkbox"></span>
</td>
,
<tr>
<td colspan="3" width="100%" align="left">
Our IDS alerted us of a possible hack attempt, but we couldn't trace the hackers IP in time.</td>
,
<tr>
<td class="lightheader" valign="top" align="left">
<span>Sat 31st Aug, year 4. <span title="Day time">Morning</span></span>
</td>
<td class="lightheader" valign="top" align="left">
<span>Motion alarms</span>
</td>
<td class="lightheader" valign="top" width="1%" align="right" nowrap="nowrap">
<span><input id="NewsItem_1303" name="D1303" value="Y" type="checkbox"></span>
</td>
,
<tr>
<td colspan="3" width="100%" align="left">
Motion alarms were beeping along various corridors, but we could not see anybody. Somebody is obviously trying to spy.</td>
,
<tr>
<td class="lightheader" valign="top" align="left">
<span>Sat 31st Aug, year 4. <span title="Day time">Morning</span></span>
</td>
<td class="lightheader" valign="top" align="left">
<span>Hack detected</span>
</td>
<td class="lightheader" valign="top" width="1%" align="right" nowrap="nowrap">
<span><input id="NewsItem_1302" name="D1302" value="Y" type="checkbox"></span>
</td>
,
<tr>
<td colspan="3" width="100%" align="left">
Our IDS alerted us of a possible hack attempt. We traced the IP back to <a href="id_view.php?ID=6103" title="antis [6103]{}Current Score: 2,448,476,927<br>Range: <span class='friendly'>85%</span><br>Acres: 4,880<br>Rank: 258 [<span class='friendly'>+26</span>]">antis</a> [6103].</td>
,
<tr>
<td class="lightheader" valign="top" align="left">
<span>Fri 30th Aug, year 4. <span title="Night time">Evening</span></span>
</td>
<td class="lightheader" valign="top" align="left">
<span>Defending <a href="id_view.php?ID=3112" title="Antisback [3112]{}Current Score: 2,872,920,867<br>Range: <span class='friendly'>100%</span><br>Acres: 9,916<br>Rank: 232 [<span class='friendly'>+0</span>]">Antisback</a> [3112]</span>
</td>
<td class="lightheader" valign="top" width="1%" align="right" nowrap="nowrap">
<span><input id="NewsItem_1301" name="D1301" value="Y" type="checkbox"></span>
</td>
,
<tr>
<td colspan="3" width="100%" align="left">
<table width="100%" align="center" border="0">
<tbody><tr>
<td class="header" align="center">
[b]Defending [id]3112[/id][/b]</td>
,
<tr>
<td class="nonebackground fightreport" align="left">
<span class="hostile">[h][close] 2,002,538 hostile Seed Thief stole 200,253,798 stored seeds. [17,940,304] tree. [108,696,421] bush. [27,541,977] flower. [46,075,096] grass. </span><br>
<span class="hostile">[h][close] 799,792 hostile Geo-Phys Thief stole 1,090 land. [264] tree. [500] bush. [164] flower. [162] grass. [0] uncultivated.[/h][/f]</span><br>
</td>
,
</tbody></table>
<br></td>
,
<tr>
<td class="lightheader" valign="top" align="left">
<span>Fri 30th Aug, year 4. <span title="Day time">Afternoon</span></span>
</td>
<td class="lightheader" valign="top" align="left">
<span>Defending <a href="id_view.php?ID=3112" title="">Antisback</a> [3112]</span>
</td>
<td class="lightheader" valign="top" width="1%" align="right" nowrap="nowrap">
<span><input id="NewsItem_1300" name="D1300" value="Y" type="checkbox"></span>
</td>
,
<tr>
<td colspan="3" width="100%" align="left">
<table width="100%" align="center" border="0">
<tbody><tr>
<td class="header" align="center">
[b]Defending [id]3112[/id][/b]</td>
,
<tr>
<td class="nonebackground fightreport" align="left">
<span class="hostile">[h][middle] 4,961,203 hostile Terrorist attacked, killing 71,776 allied staff.[/h]</span><br>
<br>Died: <span class="hostile">[h]71,776 [£10,407,520,000] friendlies dead.[/h]</span> <br><br><span class="friendly">[f]You gained 1,665 effectiveness.[/f]</span><br><span class="friendly">[f]You will soon be receiving £3,642,632,000 insurance.[/f]</span><br>
<!-- 
{1}(3112|0|2043248808|17867742121|0.114354057394)

 --></td>
,
</tbody></table>
<br></td>
,
<tr>
<td class="lightheader" valign="top" align="left">
<span>Fri 30th Aug, year 4. <span title="Day time">Noon</span></span>
</td>
<td class="lightheader" valign="top" align="left">
<span>Hack detected</span>
</td>
<td class="lightheader" valign="top" width="1%" align="right" nowrap="nowrap">
<span><input id="NewsItem_1299" name="D1299" value="Y" type="checkbox"></span>
</td>
,
<tr>
<td colspan="3" width="100%" align="left">
Our IDS alerted us of a possible hack attempt. We traced the IP back to <a href="id_view.php?ID=1654" title="Rule34 on Azzer [1654]{}Current Score: 3,529,958,750<br>Range: <span class='friendly'>122%</span><br>Acres: 4,606<br>Rank: 200 [<span class='hostile'>-32</span>]">Rule34 on Azzer</a> [1654].</td>
,
<tr>
<td class="lightheader" valign="top" align="left">
<span>Fri 30th Aug, year 4. <span title="Day time">Noon</span></span>
</td>
<td class="lightheader" valign="top" align="left">
<span>Hack detected</span>
</td>
<td class="lightheader" valign="top" width="1%" align="right" nowrap="nowrap">
<span><input id="NewsItem_1298" name="D1298" value="Y" type="checkbox"></span>
</td>
,
<tr>
<td colspan="3" width="100%" align="left">
Our IDS alerted us of a possible hack attempt, but we couldn't trace the hackers IP in time.</td>
,
<tr>
<td class="lightheader" valign="top" align="left">
<span>Fri 30th Aug, year 4. <span title="Day time">Noon</span></span>
</td>
<td class="lightheader" valign="top" align="left">
<span>Hack detected</span>
</td>
<td class="lightheader" valign="top" width="1%" align="right" nowrap="nowrap">
<span><input id="NewsItem_1297" name="D1297" value="Y" type="checkbox"></span>
</td>
,
<tr>
<td colspan="3" width="100%" align="left">
Our IDS alerted us of a possible hack attempt. We traced the IP back to <a href="id_view.php?ID=9863" title="Tree [9863]{}Current Score: 8,534,732,992<br>Range: <span class='friendly'>297%</span><br>Acres: 8,705<br>Rank: 93 [<span class='hostile'>-139</span>]<br><b>Sleep Mode.</b>">Tree</a> [9863].</td>
,
<tr>
<td class="lightheader" valign="top" align="left">
<span>Fri 30th Aug, year 4. <span title="Day time">Noon</span></span>
</td>
<td class="lightheader" valign="top" align="left">
<span>Hack detected</span>
</td>
<td class="lightheader" valign="top" width="1%" align="right" nowrap="nowrap">
<span><input id="NewsItem_1296" name="D1296" value="Y" type="checkbox"></span>
</td>
,
<tr>
<td colspan="3" width="100%" align="left">
Our IDS alerted us of a possible hack attempt, but we couldn't trace the hackers IP in time.</td>
,
<tr>
<td class="lightheader" valign="top" align="left">
<span>Fri 30th Aug, year 4. <span title="Day time">Noon</span></span>
</td>
<td class="lightheader" valign="top" align="left">
<span>Motion alarms</span>
</td>
<td class="lightheader" valign="top" width="1%" align="right" nowrap="nowrap">
<span><input id="NewsItem_1295" name="D1295" value="Y" type="checkbox"></span>
</td>
,
<tr>
<td colspan="3" width="100%" align="left">
Motion alarms beeped, and we saw a spy on our CCTV systems that works for <a href="id_view.php?ID=1220" title="Stairway To Freebird [1220]{}Current Score: 1,338,031,299<br>Range: 46%<br>Acres: 5,868<br>Rank: 456 [<span class='friendly'>+224</span>]">Stairway To Freebird</a> [1220].</td>
,
<tr>
<td class="lightheader" valign="top" align="left">
<span>Fri 30th Aug, year 4. <span title="Day time">Noon</span></span>
</td>
<td class="lightheader" valign="top" align="left">
<span>Motion alarms</span>
</td>
<td class="lightheader" valign="top" width="1%" align="right" nowrap="nowrap">
<span><input id="NewsItem_1294" name="D1294" value="Y" type="checkbox"></span>
</td>
,
<tr>
<td colspan="3" width="100%" align="left">
Motion alarms were beeping along various corridors, but we could not see anybody. Somebody is obviously trying to spy.</td>
,


..... and so on and so forth......


Output

Code:
<!-- Header file ends here --><table width="100%" align="center">
<tbody><tr>
<td class="header" colspan="3" width="100%" align="center">
<a name="Top">Reports</a>
</td>
</tr></tbody></table>

<form name="FilterFromB" method="get" action="news.php"></form>

Filter by ID: <input name="MFrom" size="5" maxlength="5" value="0" type="text"><input name="Submit" value="Show" type="submit">



1  <a href="news.php?Page=2&RF=1246430509">2</a>  <a href="news.php?Page=3&RF=1246430509">3</a>  <a href="news.php?Page=4&RF=1246430509">4</a>  <a href="news.php?Page=5&RF=1246430509">5</a>  <a href="news.php?Page=6&RF=1246430509">6</a>  <a href="news.php?Page=7&RF=1246430509">7</a>  <a href="news.php?Page=8&RF=1246430509">8</a>  <a href="news.php?Page=9&RF=1246430509">9</a>  
<form method="post" action="actions/news_hide.php"></form>
<input name="TS" value="1246430612" type="hidden">

<input name="Submit" value="Hide All" onclick="return confirm('Are you sure you wish to hide all your news?')" type="submit">




<table width="100%" align="center">
<form method="post" name="mainform" action="actions/news_hide.php"></form>
<tbody><tr>
<td colspan="3" width="100%" align="right">
<input name="Submit" value="Hide Checked" type="submit">
</td>
</tr></tbody></table>


<a id="CheckAllLink" onclick="CheckAll();" href="#">Check All</a>




<span>Sat 31st Aug, year 4. <span title="Day time">Morning</span></span> <span class="friendly">NaN Ticks Ago</span>


<span>Hack detected</span>


<span><input id="NewsItem_1304" name="D1304" value="Y" type="checkbox"></span>




Our IDS alerted us of a possible hack attempt, but we couldn't trace the hackers IP in time.



<span>Sat 31st Aug, year 4. <span title="Day time">Morning</span></span> <span class="friendly">NaN Ticks Ago</span>


<span>Motion alarms</span>


<span><input id="NewsItem_1303" name="D1303" value="Y" type="checkbox"></span>




Motion alarms were beeping along various corridors, but we could not see anybody. Somebody is obviously trying to spy.



<span>Sat 31st Aug, year 4. <span title="Day time">Morning</span></span> <span class="friendly">NaN Ticks Ago</span>


<span>Hack detected</span>


<span><input id="NewsItem_1302" name="D1302" value="Y" type="checkbox"></span>




Our IDS alerted us of a possible hack attempt. We traced the IP back to <a href="id_view.php?ID=6103" title="antis [6103]{}Current Score: 2,448,476,927<br>Range: <span class='friendly'>85%</span><br>Acres: 4,880<br>Rank: 258 [<span class='friendly'>+26</span>]">antis</a> [6103].



<span>Fri 30th Aug, year 4. <span title="Night time">Evening</span></span> <span class="friendly">NaN Ticks Ago</span>


<span>Defending <a href="id_view.php?ID=3112" title="Antisback [3112]{}Current Score: 2,872,920,867<br>Range: <span class='friendly'>100%</span><br>Acres: 9,916<br>Rank: 232 [<span class='friendly'>+0</span>]">Antisback</a> [3112]</span>


<span><input id="NewsItem_1301" name="D1301" value="Y" type="checkbox"></span>




<table width="100%" align="center" border="0">
<tbody><tr>
<td class="header" align="center">
[b]Defending [id]3112[/id][/b]</td>
</tr></tbody></table>


<span class="hostile">[h][close] 2,002,538 hostile Seed Thief stole 200,253,798 stored seeds. [17,940,304] tree. [108,696,421] bush. [27,541,977] flower. [46,075,096] grass. </span><br>
<span class="hostile">[h][close] 799,792 hostile Geo-Phys Thief stole 1,090 land. [264] tree. [500] bush. [164] flower. [162] grass. [0] uncultivated.[/h][/f]</span><br>



<br>



<span>Fri 30th Aug, year 4. <span title="Day time">Afternoon</span></span> <span class="friendly">NaN Ticks Ago</span>


<span>Defending <a href="id_view.php?ID=3112" title="">Antisback</a> [3112]</span>


<span><input id="NewsItem_1300" name="D1300" value="Y" type="checkbox"></span>




<table width="100%" align="center" border="0">
<tbody><tr>
<td class="header" align="center">
[b]Defending [id]3112[/id][/b]</td>
</tr></tbody></table>


<span class="hostile">[h][middle] 4,961,203 hostile Terrorist attacked, killing 71,776 allied staff.[/h]</span><br>
<br>Died: <span class="hostile">[h]71,776 [£10,407,520,000] friendlies dead.[/h]</span> <br><br><span class="friendly">[f]You gained 1,665 effectiveness.[/f]</span><br><span class="friendly">[f]You will soon be receiving £3,642,632,000 insurance.[/f]</span><br>
<!-- 
{1}(3112|0|2043248808|17867742121|0.114354057394)

 -->


<br>



<span>Fri 30th Aug, year 4. <span title="Day time">Noon</span></span> <span class="friendly">NaN Ticks Ago</span>


<span>Hack detected</span>


<span><input id="NewsItem_1299" name="D1299" value="Y" type="checkbox"></span>




Our IDS alerted us of a possible hack attempt. We traced the IP back to <a href="id_view.php?ID=1654" title="Rule34 on Azzer [1654]{}Current Score: 3,529,958,750<br>Range: <span class='friendly'>122%</span><br>Acres: 4,606<br>Rank: 200 [<span class='hostile'>-32</span>]">Rule34 on Azzer</a> [1654].



<span>Fri 30th Aug, year 4. <span title="Day time">Noon</span></span> <span class="friendly">NaN Ticks Ago</span>


<span>Hack detected</span>


<span><input id="NewsItem_1298" name="D1298" value="Y" type="checkbox"></span>




Our IDS alerted us of a possible hack attempt, but we couldn't trace the hackers IP in time.



<span>Fri 30th Aug, year 4. <span title="Day time">Noon</span></span> <span class="friendly">NaN Ticks Ago</span>


<span>Hack detected</span>


<span><input id="NewsItem_1297" name="D1297" value="Y" type="checkbox"></span>




Our IDS alerted us of a possible hack attempt. We traced the IP back to <a href="id_view.php?ID=9863" title="Tree [9863]{}Current Score: 8,534,732,992<br>Range: <span class='friendly'>297%</span><br>Acres: 8,705<br>Rank: 93 [<span class='hostile'>-139</span>]<br><b>Sleep Mode.</b>">Tree</a> [9863].



<span>Fri 30th Aug, year 4. <span title="Day time">Noon</span></span> <span class="friendly">NaN Ticks Ago</span>


<span>Hack detected</span>


<span><input id="NewsItem_1296" name="D1296" value="Y" type="checkbox"></span>




Our IDS alerted us of a possible hack attempt, but we couldn't trace the hackers IP in time.



<span>Fri 30th Aug, year 4. <span title="Day time">Noon</span></span> <span class="friendly">NaN Ticks Ago</span>


<span>Motion alarms</span>


<span><input id="NewsItem_1295" name="D1295" value="Y" type="checkbox"></span>




Motion alarms beeped, and we saw a spy on our CCTV systems that works for <a href="id_view.php?ID=1220" title="Stairway To Freebird [1220]{}Current Score: 1,338,031,299<br>Range: 46%<br>Acres: 5,868<br>Rank: 456 [<span class='friendly'>+224</span>]">Stairway To Freebird</a> [1220].



<span>Fri 30th Aug, year 4. <span title="Day time">Noon</span></span> <span class="friendly">NaN Ticks Ago</span>


<span>Motion alarms</span>


<span><input id="NewsItem_1294" name="D1294" value="Y" type="checkbox"></span>

</tr>
<tr>
<td colspan="3" width="100%" align="left">
Motion alarms were beeping along various corridors, but we could not see anybody. Somebody is obviously trying to spy.</td>
</tr>

..... and so on and so forth......



Well as you can see they're completely different, and i can't for the life of me figure out why

(the original code is in javascript)
 

Weeble

Community Manager
Administrator
Joined
Dec 13, 2007
Messages
869
Location
UK
Maybe you'd be better served making any alterations to the trs[x] line, then adding that to a separate array instead of overwriting/appending the new data? It looks as if your pattern matching is slightly off.. You've got to bear in mind that you're removing all </tr>s with your .split earlier on (and will need to manually stick them back in, or otherwise, to each line of the trs[] array).
I can give it a more in depth analysis later on if needed :p
 

Chezz

Harvester
Joined
Mar 30, 2008
Messages
175
And.....Antisback, could you please update the addon to be compatible with the newly released Firefox 3.5? Thanks very much :D

I'm sorry I can't help with this coding problem 'cos I don't know any Javascript :(
 
Last edited by a moderator:

antisback

Head Gardener
Joined
Dec 14, 2007
Messages
429
I fixed the code in the end, thanks weeble.


-snip-
Scratch that just found a quick fix to make it compatible with FF 3.5 :p

Will be releasing the update later today
 
Last edited:
Top