[quote=“emeth, post:10, topic:3350”]Every man has his price Fuzzy… what’s yours?
Decision is totally yours, but if it helps…
Looking at the code after you updated:
http://www.peercointalk.org/Themes/default/shoutbox.js
[code]function Shoutbox_GetMsgs()
{
// bug? .-.
if (Shoutbox.posting || Shoutbox.loading)
return;
if (Shoutbox.first)
{
// check this first :)
var c = document.getElementById('s'+'h'+'o'+'u'+'t'+'b'+'o'+'x'+'_'+'b'+'a'+'r');
if (!c)
return window.alert('('+'c'+'c'+')'+' '+'S'+'M'+'F'+'P'+'a'+'c'+'k'+'s'+'.'+'c' + 'o' + 'm');
var v = ' | <'+'a'+' '+'t'+'i'+'t'+'l'+'e'+'='+'"'+'S'+'M'+'F'+'P'+'a'+'c'+'k'+'s'+'.'+'c'+'o'+'m'+'"';
v += ' '+'t'+'a'+'r'+'g'+'e'+'t'+'='+'"'+'_'+'b'+'l'+'a'+'n'+'k'+'"';
v += ' '+'h'+'r'+'e'+'f'+'='+'"'+'h'+'t'+'t'+'p'+':'+'/'+'/';
v += 'w'+'w'+'w'+'.'+'s'+'m'+'f'+'p'+'a'+'c'+'k'+'s'+'.'+'c'+'o'+'m'+'/';
v += '"'+'>'+'&'+'c'+'o'+'p'+'y'+';'+' '+'S'+'M'+'F'+'P'+'a'+'c'+'k'+'s'+'<'+'/'+'a'+'>';
setInnerHTML(c,v);
}
// show loading
if (Shoutbox.msgs !== false) window.clearTimeout(Shoutbox.msgs);
Shoutbox.loading = true;
document.getElementById("shoutbox_status").style.visibility = 'visible';
Shoutbox_getXML(smf_scripturl + "?action=shoutbox;sa=get;xml;row=" + Shoutbox.maxmsgs + (Shoutbox.first ? ';restart' : ''), Shoutbox_PutMsgs);
}[/code]
The first time the script checks for new messages, if, due to the race condition of html loading vs javascript loading, this code is being executed before the html for the shoutbox loads, it cancels the get_messages call and shows an alert instead. The get_messages call is then called again later after the html loads, and succeeds.
There will be absolutely 0 side-effects if you kill the line that says
return window.alert('('+'c'+'c'+')'+' '+'S'+'M'+'F'+'P'+'a'+'c'+'k'+'s'+'.'+'c' + 'o' + 'm');
and replace it with
return;
As both serve the exact same function, short-circuiting the get_messages function because the html isn’t present yet.
Totally understand if you want to wait and see what they come back with.[/quote]
Ok this is the explanation of the code I was hoping to have on the shoutbox thread but no one seems to want to respond like this so hats off to you I am changing the code now.
Please let me kinow if this resolves the issue and if any other strange activity occurs.
Fuzzybear