lemoynelibrary / lemoyne

Files used in setting up new web design in LibGuides v2 and elsewhere
5 stars 1 forks source link

Add Chat Widget to Library domains #84

Open tomkeays opened 2 years ago

tomkeays commented 2 years ago

LibraryH3lp has a widget builder in their Admin Dashboard (see Chat Snippets section)

Instructions for building the widgets can be found in the Library's Systems Procedures section of the Staff pages.

The widget is to be deployed by adding it to the footer code of each of the library domains.

Here is the code snippet we're using:

<!-- Place this div in your web page where you want your chat widget to appear. -->
<div class="needs-js">chat loading...</div>

<!-- 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://") + "libraryh3lp.com/js/libraryh3lp.js?17925";
    var y = document.getElementsByTagName("script")[0]; y.parentNode.insertBefore(x, y);
  })();
</script>
tomkeays commented 2 years ago

It was necessary to create a second widget for the Library catalog to address a positioning problem. So, so the Bootstrap-based sites, we will be using the code snippet with ID #17925 whereas the catalog requires a nearly identical code snippet with ID #17932.

tomkeays commented 2 years ago

SerSol requires 24 hours before changes go live. Check on Jan 5 to see if change worked.