I had originally thought of just showing an specific image depending on what browser the viewer is using - using below code to detect the browser.
Code: Select all
<script src="https://cdn.jsdelivr.net/npm/bowser@latest/es5.js"></script>
<script type="text/javascript">
var result = bowser.getParser(window.navigator.userAgent);
//document.write("You are using " + result.parsedResult.browser.name + " " + result.parsedResult.engine.name);
if (result.parsedResult.browser.name === "Microsoft Edge" && result.parsedResult.engine.name === "Blink" )
{
document.write("Microsoft Edge (Chromium)");
}
else if (result.parsedResult.browser.name === "Microsoft Edge" && result.parsedResult.engine.name === "EdgeHTML" )
{
document.write("Microsoft Edge");
}
else if (result.parsedResult.browser.name === "Chrome" )
{
document.write("Google Chrome");
}
else if (result.parsedResult.browser.name === "Internet Explorer")
{
document.write("Internet Explorer");
}
else if (result.parsedResult.browser.name === "Firefox")
{
document.write("Firefox");
}
else
{
document.write("Other - " + "Browser Name: " + result.parsedResult.browser.name + " - Engine Name: " + result.parsedResult.engine.name);
}
</script>
If so then can I using HelpXplain and the above JS get it to show particular image (or sequence) depending on the IF result in the JS above?
Any pointers appreciated as not spent much time using Xplain yet - although I know I really should be making use of its abilities for things like this.
Thanks