45 lines
1.8 KiB
PHP
45 lines
1.8 KiB
PHP
|
|
<script>
|
|
require(['converse'], function (converse) {
|
|
(function () {
|
|
/* XXX: This function initializes jquery.easing for the https://conversejs.org
|
|
* website. This code is only useful in the context of the converse.js
|
|
* website and converse.js itself is NOT dependent on it.
|
|
*/
|
|
var $ = converse.env.jQuery;
|
|
$.extend( $.easing, {
|
|
easeInOutExpo: function (x, t, b, c, d) {
|
|
if (t==0) return b;
|
|
if (t==d) return b+c;
|
|
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
|
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
|
},
|
|
});
|
|
|
|
$(window).scroll(function() {
|
|
if ($(".navbar").offset().top > 50) {
|
|
$(".navbar-fixed-top").addClass("top-nav-collapse");
|
|
} else {
|
|
$(".navbar-fixed-top").removeClass("top-nav-collapse");
|
|
}
|
|
});
|
|
//jQuery for page scrolling feature - requires jQuery Easing plugin
|
|
$('.page-scroll a').bind('click', function(event) {
|
|
var $anchor = $(this);
|
|
$('html, body').stop().animate({
|
|
scrollTop: $($anchor.attr('href')).offset().top
|
|
}, 700, 'easeInOutExpo');
|
|
event.preventDefault();
|
|
});
|
|
})();
|
|
converse.initialize({
|
|
bosh_service_url: 'https://konvos.cf:5281/http-bind', // Please use this connection manager only for testing purposes
|
|
keepalive: true,
|
|
message_carbons: true,
|
|
play_sounds: true,
|
|
roster_groups: true,
|
|
show_controlbox_by_default: true,
|
|
xhr_user_search: false
|
|
});
|
|
});
|
|
</script> |