Using Parameters in the URL
function getQueryParam(key) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] === key) {
return pair[1];
}
}
}new WBBChatPlugin({
client: "wbb",
pluginHost: host,
fullScreen: false,
// The min pixel width at which the popup should be used as apposed to full screen mode
minPopupWidth: 600,
// Client icon
clientIcon: true,
// Primary colour
primaryColour: getQueryParam("primaryColour") || "007FAD",
// Secondary colour
secondaryColour: "435061",
// Prevent the user from sending input other that clicking buttons
hideInput: true,
});Last updated