Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Commit

Permalink
Param to specify which GDS version to use by default
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaDelBuono committed Aug 6, 2019
1 parent 69de249 commit 982f5d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions assets/javascript/hmcts-webchat.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function parseText(text) {
}

function webchat_init(customParams) {
const version = '0.3.7';
const version = '0.3.8';
const requiredParams = [
'uuid',
'tenant',
Expand Down Expand Up @@ -100,7 +100,8 @@ function webchat_init(customParams) {
path: '/.',
buttonContainerId: 'ctsc-web-chat',
chatDownAction: 'showMessage', // use 'showMessage' or 'hideHeader'
chatLinkFocusable: true
chatLinkFocusable: true,
gdsMajorVersion: 3
};

let params = Object.assign({}, defaultParams, customParams);
Expand All @@ -117,7 +118,7 @@ function webchat_init(customParams) {
params.stylesheetURL.startsWith('https:') ? params.stylesheetURL :
(params.stylesheetURL.startsWith('/') && location.protocol === 'https') ?
'https://' + window.location.hostname + ':' + window.location.port + params.stylesheetURL :
'https://cdn.jsdelivr.net/npm/@hmcts/ctsc-web-chat@' + version + '/assets/css/hmcts-webchat.min.css',
'https://cdn.jsdelivr.net/npm/@hmcts/ctsc-web-chat@' + version + '/assets/css/hmcts-webchat-gds-v' + params.gdsMajorVersion + '.css',
busHandlerURL: params.busHandlerURL,
chatDownAction: params.chatDownAction,
chatLinkFocusable: params.chatLinkFocusable,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ctsc-web-chat",
"version": "0.3.7",
"version": "0.3.8",
"description": "HMCTS CTSC Web Chat",
"repository": {
"type": "git",
Expand Down

0 comments on commit 982f5d0

Please sign in to comment.