Commit 84ff7424 authored by JC Brand's avatar JC Brand

Update demo/index.html to not rely on old code

parent 707fd07d
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
<meta name="keywords" content="xmpp chat webchat converse.js" /> <meta name="keywords" content="xmpp chat webchat converse.js" />
<link rel="shortcut icon" type="image/ico" href="images/favicon.ico"/> <link rel="shortcut icon" type="image/ico" href="images/favicon.ico"/>
<link type="text/css" rel="stylesheet" media="screen" href="https://cdn.conversejs.org/5.0.4/dist/font-awesome.min.css" /> <link type="text/css" rel="stylesheet" media="screen" href="../dist/website.min.css" />
<link type="text/css" rel="stylesheet" media="screen" href="https://cdn.conversejs.org/5.0.4/dist/website.min.css" />
<script type="text/javascript" src="/analytics.js"></script> <script type="text/javascript" src="/analytics.js"></script>
<noscript><p><img src="//stats.opkode.com/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript> <noscript><p><img src="//stats.opkode.com/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
<![if gte IE 9]> <![if gte IE 9]>
...@@ -75,47 +74,37 @@ ...@@ -75,47 +74,37 @@
</body> </body>
<script> <script>
require(['converse'], function (converse) { /*
(function () { @licstart
/* XXX: This function initializes jquery.easing for the https://conversejs.org This is free and unencumbered software released into the public domain.
* 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() { Anyone is free to copy, modify, publish, use, compile, sell, or
if ($(".navbar").offset().top > 50) { distribute this software, either in source code form or as a compiled
$(".navbar-fixed-top").addClass("top-nav-collapse"); binary, for any purpose, commercial or non-commercial, and by any
} else { means.
$(".navbar-fixed-top").removeClass("top-nav-collapse");
} In jurisdictions that recognize copyright laws, the author or authors
}); of this software dedicate any and all copyright interest in the
//jQuery for page scrolling feature - requires jQuery Easing plugin software to the public domain. We make this dedication for the benefit
$('.page-scroll a').bind('click', function(event) { of the public at large and to the detriment of our heirs and
var $anchor = $(this); successors. We intend this dedication to be an overt act of
$('html, body').stop().animate({ relinquishment in perpetuity of all present and future rights to this
scrollTop: $($anchor.attr('href')).offset().top software under copyright law.
}, 700, 'easeInOutExpo');
event.preventDefault(); THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
}); EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
})(); MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org/>
@licend
*/
converse.initialize({ converse.initialize({
// Please use this connection manager only for testing purposes // Please use this connection manager only for testing purposes
bosh_service_url: 'https://conversejs.org/http-bind/', bosh_service_url: 'https://conversejs.org/http-bind/'
keepalive: true,
message_carbons: true,
play_sounds: true,
roster_groups: true,
show_controlbox_by_default: true,
});
}); });
</script> </script>
</html> </html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment