Problems with JS

Go down

Solved Problems with JS

Post by Amadeus on May 17th 2020, 4:16 pm

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
Amadeus
Forumember

Female Posts : 143
Reputation : 1
Language : Polish, English
Location : Poland

View user profile

Back to top Go down

Solved Re: Problems with JS

Post by TheCrow on May 17th 2020, 7:00 pm

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.
TheCrow
TheCrow
Manager
Manager

Male Posts : 6421
Reputation : 746
Language : Greek, English

View user profile https://forumote.forumotion.com

Back to top Go down

Solved Re: Problems with JS

Post by Amadeus on May 17th 2020, 7:25 pm

Hello. Unfortunately, he's not working on phpbb2 with me. I use Google Chrome every day, sometimes Maxthon, but it's very rare.
Amadeus
Amadeus
Forumember

Female Posts : 143
Reputation : 1
Language : Polish, English
Location : Poland

View user profile

Back to top Go down

Solved Re: Problems with JS

Post by TheCrow on May 17th 2020, 7:39 pm

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.
TheCrow
TheCrow
Manager
Manager

Male Posts : 6421
Reputation : 746
Language : Greek, English

View user profile https://forumote.forumotion.com

Back to top Go down

Solved Re: Problems with JS

Post by Neptune- on May 17th 2020, 8:18 pm

Hello,


What is the exact URL of the page where the chatbox is placed ?
Neptune-
Neptune-
Forumember

Male Posts : 408
Reputation : 90
Language : French (10), English (8), CSS (5), HTML (4), Javascript (4)
Location : France

View user profile https://www.galaxie-series.net/

Back to top Go down

Solved Re: Problems with JS

Post by Amadeus on May 18th 2020, 5:05 pm

Okey I delete cookies and working. Thank you for help
Amadeus
Amadeus
Forumember

Female Posts : 143
Reputation : 1
Language : Polish, English
Location : Poland

View user profile

Back to top Go down

Solved Re: Problems with JS

Post by skouliki on May 18th 2020, 5:32 pm

Problem solved & topic archived.
Please read our forum rules:  ESF General Rules
skouliki
skouliki
Manager
Manager

Female Posts : 9694
Reputation : 1244
Language : English,Greek
Location : Greece

View user profile http://iconskouliki.forumgreek.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum