Skip to content

Instantly share code, notes, and snippets.

@guinslym
Last active April 30, 2019 19:09
Show Gist options
  • Save guinslym/c5fb0b41173bd5ceade278e699a8b5b3 to your computer and use it in GitHub Desktop.
Save guinslym/c5fb0b41173bd5ceade278e699a8b5b3 to your computer and use it in GitHub Desktop.
Template for Proactive Chat in LH3
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
<div class="jumbotron">
<h1 class="display-4">Proactive Chat Example!</h1>
<p class="lead">This is a simple proactive chat Example. <br/>
Please login in the <a href="https://ca.libraryh3lp.com/webclient/client" target="_blank">Practice</a> queue. The Proactive widget will not go on if there is no operator in the practice queue.
</p>
<hr class="my-4">
<p class="lead">
<a class="btn btn-primary btn-lg" href="#" role="button" id="countdown">Learn more</a>
</p>
<div ></div>
</div>
<!-- Place this div in your web page where you want your chat widget to appear. -->
<div class="needs-js">chat loading...</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<!-- Place this script as near to the end of your BODY as possible. -->
<script type="text/javascript">
(function() {
var x = document.createElement("script"); x.type = "text/javascript"; x.async = true;
x.src = (document.location.protocol === "https:" ? "https://" : "http://") + "ca.libraryh3lp.com/js/libraryh3lp.js?899";
var y = document.getElementsByTagName("script")[0]; y.parentNode.insertBefore(x, y);
})();
//JavaScript countdown
var timeleft = 5;
var downloadTimer = setInterval(function(){
document.getElementById("countdown").innerHTML = timeleft + " seconds remaining";
timeleft -= 1;
if(timeleft <= 0){
clearInterval(downloadTimer);
document.getElementById("countdown").innerHTML = "Voila!"
}
}, 1000);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment