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

This commit is contained in:
JC Brand 2019-11-20 11:03:40 +01:00
parent 707fd07dc6
commit 84ff74242e

View File

@ -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 @@
</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.
converse.initialize({ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// Please use this connection manager only for testing purposes OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
bosh_service_url: 'https://conversejs.org/http-bind/', ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
keepalive: true, OTHER DEALINGS IN THE SOFTWARE.
message_carbons: true,
play_sounds: true, For more information, please refer to <https://unlicense.org/>
roster_groups: true, @licend
show_controlbox_by_default: true, */
}); converse.initialize({
// Please use this connection manager only for testing purposes
bosh_service_url: 'https://conversejs.org/http-bind/'
}); });
</script> </script>
</html> </html>