The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Problems with JS

4 posters

Go down

Solved Problems with JS

Post by Amadeus May 17th 2020, 16:16

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 : 157
Reputation : 1
Language : Polish, English
Location : Poland

Back to top Go down

Solved Re: Problems with JS

Post by TheCrow May 17th 2020, 19:00

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.


Problems with JS Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6922
Reputation : 795
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Problems with JS

Post by Amadeus May 17th 2020, 19:25

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 : 157
Reputation : 1
Language : Polish, English
Location : Poland

Back to top Go down

Solved Re: Problems with JS

Post by TheCrow May 17th 2020, 19:39

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.


Problems with JS Thecro10
Forum of the Forums

Forumotion Rules | Tips & Tricks |
FAQ | Did you forget your password?



*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
TheCrow
TheCrow
Manager
Manager

Male Posts : 6922
Reputation : 795
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Problems with JS

Post by Neptune- May 17th 2020, 20:18

Hello,


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

Female Posts : 496
Reputation : 104
Language : French (10), English (8), CSS (5), HTML (4), Javascript (4)
Location : Scotland, UK

https://www.galaxie-series.net/

Back to top Go down

Solved Re: Problems with JS

Post by Amadeus May 18th 2020, 17:05

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

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

Back to top Go down

Solved Re: Problems with JS

Post by skouliki May 18th 2020, 17:32

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

Female Posts : 15252
Reputation : 1701
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Back to top

- Similar topics

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