librelist archives

« back to archive

Putting chat widget in a

Putting chat widget in a

From:
David Deutsch
Date:
2014-08-22 @ 12:41
Hello,

Is there any way to programmatically log in and display the chat control 
in a specific <div> tag, rather than having the login dialog pop up when 
the page loads?

   Thanks,

    David

Re: [conversejs] Putting chat widget in a

From:
Jc Brand
Date:
2014-08-23 @ 08:22
On Fri, Aug 22, 2014 at 12:41:20PM +0000, David Deutsch wrote:
>    Hello,
> 
>    Is there any way to programmatically log in and display the chat control
>    in a specific <div> tag, rather than having the login dialog pop up when
>    the page loads?

See here:

https://github.com/jcbrand/converse.js/blob/e3dbbf2eae2593bd0ec3d13b562786b8b74aeab9/converse.js#L1790

In the marked line, the control box element is appended after its toggle,
inside the #conversejs element.

You can change that code to instead place it somewhere else (your own div for
example).

I think things should then still work normally, unless there is somewhere in
the code the assumption that the control box MUST be inside the #conversejs
element.

JC