This document describes version 5 of Unblu. If you’re using the latest major version of Unblu, go to the documentation of the latest version. The support period for version 5 ended on 22 November 2021. We no longer provide support or updates for this version. You should upgrade to the latest version of Unblu. |
How to determine if your web page is being displayed inside the browser
This is a very specific use case. The problem this script solves is: How do you know if you are within a universal co-browsing session or not? |
For example, if you wanted an area on a page to contain special links, or additional information, that only appear when you have started a universal co-browsing session, use the code snippet below to tell you if you are in a universal co-browsing session inside the browser.
Code snippet to detect universal co-browsing
The snippet below checks whether you are inside the browser in order that the code you have written that is intended to be universal co-browse-specific will execute in the right place.
<script type="text/javascript">
if( typeof(unbluBrowser) != "undefined" && unbluBrowser.log) {
// Your code that runs when within a co-browse session
// e.g. Load additional CSS
}
</script>