Ich hab mal wieder ein Prob das mich echt Nerven kostet.......
folgendes Problem: Ich hab hier eine Website wo noch zusätzlich ein Greasemonkeyskript werkelt. Wenn ich dort eine bestimmte Option einschalte wird nur ein Teil übertragen.
Der Problematische Code im Greasemonkeyskript lautet:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
if (settingscur['statlinks_use_gala'])
{
var Link = null;
var LinkText = null;
function ogs_addOverLibTest(obj,code)
{
obj.removeAttribute('onmouseout');
obj.removeAttribute('onmouseover');
ogs.addEvent(obj,'mouseout',ogs.window.nd,true);
ogs.addEvent(obj,'mouseover',eval('new Function(\'\',\"ogs.window.'+code.replace(/\n/g,'').replace(/.*overlib\(\'/,'overlib(\\\"').replace(/\', .*/,'\\\", '+ogs.window.STICKY+', '+ogs.window.MOUSEOFF+', '+ogs.window.DELAY+', 750, '+ogs.window.CENTER+', '+ogs.window.OFFSETY+', -40);')+'\")'),true);
}
//spieler
Link = Spalte[5-FoxGameVerkl].getElementsByTagName('a');
if (Link.length > 0 && statlinks.pn.length > 0)
{
Link = Link[0];
LinkText = '';
for (var j = 0; j < statlinks.pn.length; j++)
LinkText += ogs_statlinks_creattooltipline(statlinks.pu[j], Link.getElementsByTagName('span')[0].innerHTML.trim(),statlinks.pn[j]);
ogs_addOverLibTest(Link,Link.getAttribute('onmouseover').toString().replace('</table></th>','</table></th></tr><tr><th><table>' + LinkText + '</table></th></tr>'));
}
//ally
Link = Spalte[6-FoxGameVerkl].getElementsByTagName('a');
if (Link.length > 0 && statlinks.an.length > 0)
{
Link = Link[0];
LinkText = '';
for (var j = 0; j < statlinks.an.length; j++)
LinkText += ogs_statlinks_creattooltipline(statlinks.au[j], Link.innerHTML.replace(/<.*?>/g,'').trim(),statlinks.an[j]);
ogs_addOverLibTest(Link,Link.getAttribute('onmouseover').toString().replace('</table></th>','</table></th></tr><tr><th><table>' + LinkText + '</table></th></tr>'));
}
}
Und der probematische Teil (Ally) ist
LinkText += ogs_statlinks_creattooltipline(statlinks.au[j], Link.innerHTML.replace(/<.*?>/g,'').trim(),statlinks.an[j]);
Der Code ersetzt jeweils eine kleine Tabelle(Spieler und Ally) und baut dann eine neue wo noch zusätzliche Links hinzugefügt werden
Ein CGI-Script fängt das dann ab und verarbeitet es dann in eine Tabelle. Ist der Greasemonkeycode nicht aktiv funktioniert es tadellos und alles wird sauber übertragen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
if ($besetzt == 1) {
$array[$runner] =~ m/<span class="\w+">(.+?)<\/span>/;
$sys{$plani}{'player'} = $1;
$sys{$plani}{'player'} =~ s/\s\(.*//;
$sys{$plani}{'player'} =~ s/(\+|\-|\*|\?)/\\$1/g;
$sys{$plani}{'player'} =~ s/\\(.)/$1/g;
$sys{$plani}{'player'} =~ s/<.*?>//g;
if ($array[$runner] =~ m/$regex7/) {
if ($1 ne '' && $1 ne $sys{$plani}{'player'} && $1 ne '-' && $1 ne $sys{$plani}{'place'}) {
$sys{$plani}{'ally'} = $1;
}
} elsif ($array[$runner] =~ /(.*?)\s*<\/a>\n*\s*<br><span.*?>#([\d\.]+) \//) {
$sys{$plani}{'ally'} = $1;
}
$sys{$plani}{'ally'} =~ s/^\s*//;
$sys{$plani}{'ally'} =~ s/<.*?>//g;
Hat da einer eine Idee?