Problem with chatbox auto-login javascript Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

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.
2 posters

    Problem with chatbox auto-login javascript

    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Problem with chatbox auto-login javascript

    Post by Van-Helsing 24/2/2015, 08:01

    Hello,
    I am using the following javascript for chatbox members auto-login but it conflicts other javascripts is there a way to fix it?

    Code:

    $(function() {
        var chatbox_window = document.getElementById('frame_chatbox');
        var iframewindow = chatbox_window.contentWindow ? chatbox_window.contentWindow : chatbox_window.contentDocument.defaultView;
        var chat = iframewindow.chatbox;
        function check_logged()
        {
            if( !chat.connected ) {
                chat.connect();
            }
        }
        check_logged();
        setInterval(function() {
            check_logged();
        }, 3000);

    });


    Last edited by Black-Shadow on 24/2/2015, 08:39; edited 1 time in total
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Problem with chatbox auto-login javascript

    Post by Ange Tuteur 24/2/2015, 08:18

    Hi @Black-shadow,

    Try this instead :
    Code:
    $(window).load(function() {
      var chatbox_script = function() {
        setTimeout(function(){ $('#chatbox_option_co:visible').click() }, 1000);
      };
      var s=document.createElement('script');s.text="("+chatbox_script.toString()+")();";$('object[data^="/chatbox/index.forum"],iframe[src^="/chatbox/index.forum"]').each(function(){try{$(this.contentDocument||this.contentWindow.document).find("#chatbox").closest("html").find("head").first().each(function(){this.appendChild(s.cloneNode(true))})}catch(a){}})
    });
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: Problem with chatbox auto-login javascript

    Post by Van-Helsing 24/2/2015, 08:23

    Hi Ange Tuteur,
    It seems working is there a way to hide the options archive/login/logout due the members are always connect in chatbox?
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Problem with chatbox auto-login javascript

    Post by Ange Tuteur 24/2/2015, 08:28

    Add the following code to your stylesheet.
    Administration Panel > Display > Colors > CSS stylesheet
    Code:
    a[href="/chatbox/index.forum?archives=1"], #chatbox_option_disco { display:none }
    Van-Helsing
    Van-Helsing
    Hyperactive


    Male Posts : 2431
    Reputation : 116
    Language : English, Greek

    Solved Re: Problem with chatbox auto-login javascript

    Post by Van-Helsing 24/2/2015, 08:40

    Thank you very much Ange it seems solved.
    ~1~
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Problem with chatbox auto-login javascript

    Post by Ange Tuteur 24/2/2015, 09:05

    You're welcome ^^

    Topic arhived

    Have a nice day Smile