Problems with JS
4 posters
Page 1 of 1
Problems with JS
Hello, everyone. I would like to ask for help with javascript related to Chatbox login and logout. When I applied this JS unfortunately it didn't work for me on the forum because I didn't have these tags disappeared. And I want you to be able to write on this chatbox without logging in. This Js only works on two browsers Firefox and Miscrosoft Edge. I'm asking nicely for help.
- Code:
$(window).load(function() {
var chatbox_script = function() {
$('#chatbox > p > .msg > span').filter('[style="color:green"],[style="color:red"]').closest('p').remove();
var overrided = Chatbox.prototype.refresh;
Chatbox.prototype.refresh = function(data) {
if (data.messages && data.messages.length) {
data.messages = $.grep(data.messages, function(v) {
return v.userId != -10 || $.inArray(v.msgColor, ["red", "green"]) == -1;
});
}
overrided.call(this, data);
};
};
var s=document.createElement('script');s.text="("+chatbox_script.toString()+")();";$('object[data^="/chatbox"],iframe[src^="/chatbox"]').each(function(){try{$(this.contentDocument||this.contentWindow.document).find("#chatbox").closest("html").find("head").first().each(function(){this.appendChild(s.cloneNode(true))})}catch(a){}})
});
Amadeus- Forumember
-
Posts : 157
Reputation : 1
Language : Polish, English
Location : Poland
Re: Problems with JS
Hello @Amadeus,
So this code is not working for you? On what browser are you referring to and what do you mean on "this chatbox" ?
Regards,
TC.
So this code is not working for you? On what browser are you referring to and what do you mean on "this chatbox" ?
Regards,
TC.
Re: Problems with JS
Hello. Unfortunately, he's not working on phpbb2 with me. I use Google Chrome every day, sometimes Maxthon, but it's very rare.
Amadeus- Forumember
-
Posts : 157
Reputation : 1
Language : Polish, English
Location : Poland
Re: Problems with JS
It works fine to me using Google Chrome and on my testing #Phpbb2 version forum.
Have you tried clearing your browser's history and the cookies and cache?
Regards,
TC.
Have you tried clearing your browser's history and the cookies and cache?
Regards,
TC.
Re: Problems with JS
Okey I delete cookies and working. Thank you for help
Amadeus- Forumember
-
Posts : 157
Reputation : 1
Language : Polish, English
Location : Poland

» title problems/icon problems/member list problems
» Gallery Problems - both managing & layout problems.
» Problems with the background color on a 'Quote on Quote' response and problems with the background color on my 'Quick Reply' box
» The new widget code has problems ( and other widget problems )
» some problems~ please help.....
» Gallery Problems - both managing & layout problems.
» Problems with the background color on a 'Quote on Quote' response and problems with the background color on my 'Quick Reply' box
» The new widget code has problems ( and other widget problems )
» some problems~ please help.....
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum