diff --git a/assets/css/hmcts-webchat_old.css b/assets/css/hmcts-webchat_old.css deleted file mode 100644 index e03a0c3..0000000 --- a/assets/css/hmcts-webchat_old.css +++ /dev/null @@ -1,182 +0,0 @@ -/***************************************************************************** - * General - *****************************************************************************/ -body, input[type="text"], textarea, button, select, .confirm-close { - font-family: "nta", Arial, sans-serif; - font-size: 19px; - font-weight: 400; - color: #0b0c0c; -} - -/***************************************************************************** - * Container - *****************************************************************************/ -.container, .inner-container, button { - border-radius: 0; -} - -.inner-container { - -ms-filter: "none"; - background: none; - padding: 0; -} - - -/***************************************************************************** - * Controls - *****************************************************************************/ -.control { - background: none !important; - border: 0 !important; - line-height: 1.1; - text-decoration: none !important; - opacity: 1 !important; - width: 50px; -} - -.control:hover { - opacity: 1 !important; -} - -.control.close:before, .control.end:before { - font-size: 14px; - font-weight: 400; - color: #fff; - content: "close \00D7"; -} - -/***************************************************************************** - * Header - *****************************************************************************/ -.header .logo { - display: none !important; -} - -.header .title { - background: #000; - font-size: 24px; - font-weight: 600; - color: #fff; - padding: 5px 8px; -} - -.header p { - font-size: 19px; - color: #0b0c0c; - font-weight: 400; -} - -label { - font-size: 19px; - color: #0b0c0c; - font-weight: 400; -} - -.footer { - display: none; -} - - -/***************************************************************************** - * Form - *****************************************************************************/ -input[type="text"], textarea, .message-history, select { - box-shadow: none; -} - -button, button:active { - -ms-filter: "none"; - background-image: none; - background-color: #00823B !important; - box-shadow: none; - color: #fff !important; -font-size: 19px; -} - -/***************************************************************************** - * Introduction - *****************************************************************************/ -.intro { - padding: 0 20px; -} - -/***************************************************************************** - * Window - *****************************************************************************/ -.translation-header { - border-left: 0; - border-right: 0; -} - -/***************************************************************************** - * Message - *****************************************************************************/ -#message-field { - border: 0 !important; -} - -.message-history { - border-left: 0; - border-right: 0; -} - -.message-actions { - z-index: 1; -} - -.message-wrapper { - padding: 15px; -} - -.message-content { - display: inline-block; - width: 100%; -} - -.chat-outgoing-msg, .chat-incoming-msg { - border: 1px solid #ddd; - color: #fff; - position: relative; - font-size: 19px; - font-weight: 400; -} - -.chat-outgoing-msg { - background: #408B68; - margin-left: 20%; - text-align: left; - border-radius: 5px; -} - -.chat-incoming-msg { - margin-right: 20%; - background: #4c2c92; - border-radius: 5px; - color: #fff; -} - -.chat-incoming-msg a { - color: #fff !important; -} - - -.chat-log-msg, .chat-info-msg, .chat-error-msg, .chat-link-msg { - text-align: left; - font-size: 19px; - font-weight: 400; - font-style: normal; -} - -/* hide counter */ -#message-counter { - visibility: hidden; - width: 0; -} -/***************************************************************************** - * Acknowledge/Close messages - *****************************************************************************/ -.acknowledge-text, .confirm-close { - padding: 0; -} -/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:'nta';src:url("https://assets.publishing.service.gov.uk/static/fonts/v1-2c037cf7e1-light-1a1bd902f82aaab4185bc1995206ccdead57a5b0adc91ff8403468fe7047c1b4.eot");src:url("https://assets.publishing.service.gov.uk/static/fonts/v1-2c037cf7e1-light-1a1bd902f82aaab4185bc1995206ccdead57a5b0adc91ff8403468fe7047c1b4.eot?#iefix") format("embedded-opentype"),url("https://assets.publishing.service.gov.uk/static/fonts/v1-f38ad40456-light-b98fe790388f58c950f2bed1ca8ad02fa168d6effa7aae7cb7fee81e51183f46.woff2") format("woff2"),url("https://assets.publishing.service.gov.uk/static/fonts/v1-458f8ea81c-light-048b93884a1b51d20f2a3140541d450cb6b82c6c2cf69128ea1d09fdd9699f30.woff") format("woff");font-weight:normal;font-style:normal;font-display:fallback}@font-face{font-family:'nta';src:url("https://assets.publishing.service.gov.uk/static/fonts/v1-fb2676462a-bold-a49a59a7c9fc3873b9b864f9185ba79d7848db4b4e0f248ce87a819ee48fff93.eot");src:url("https://assets.publishing.service.gov.uk/static/fonts/v1-fb2676462a-bold-a49a59a7c9fc3873b9b864f9185ba79d7848db4b4e0f248ce87a819ee48fff93.eot?#iefix") format("embedded-opentype"),url("https://assets.publishing.service.gov.uk/static/fonts/v1-a2452cb66f-bold-be83c947da6c602697be56d5f04bab2074ad9e8e7fe39807f814654fd691d328.woff2") format("woff2"),url("https://assets.publishing.service.gov.uk/static/fonts/v1-f38c792ac2-bold-01c73d5dd84423dd2fc30aabd1de09a86b36b6de9e2e240d954c09cbb1d97aba.woff") format("woff");font-weight:bold;font-style:normal;font-display:fallback}@font-face{font-family:'ntatabularnumbers';src:url("https://assets.publishing.service.gov.uk/static/fonts/v1-498ea8ffe2-tabular-light-c45387d8b19c716ac713adceddbbfaafc62bc7f94ee1745cc3497b1afbe7eb58.eot");src:url("https://assets.publishing.service.gov.uk/static/fonts/v1-498ea8ffe2-tabular-light-c45387d8b19c716ac713adceddbbfaafc62bc7f94ee1745cc3497b1afbe7eb58.eot?#iefix") format("embedded-opentype"),url("https://assets.publishing.service.gov.uk/static/fonts/v1-851b10ccdd-tabular-light-5f44884b5bbefe279fb3529a09941c7c1cad0ed751dc369f5e549dcd7d58d429.woff2") format("woff2"),url("https://assets.publishing.service.gov.uk/static/fonts/v1-62cc6f0a28-tabular-light-b36c2402a99df8f8195129efa8edbd6ec60260ce8b8bd3ffe3dbb87042fb6a99.woff") format("woff");font-weight:normal;font-style:normal;font-display:fallback}@font-face{font-family:'ntatabularnumbers';src:url("https://assets.publishing.service.gov.uk/static/fonts/v1-357fdfbcc3-tabular-bold-0cff7dfafbfd65a765046861e6967892b25a903675cb8900b85d2fa4f4554f95.eot");src:url("https://assets.publishing.service.gov.uk/static/fonts/v1-357fdfbcc3-tabular-bold-0cff7dfafbfd65a765046861e6967892b25a903675cb8900b85d2fa4f4554f95.eot?#iefix") format("embedded-opentype"),url("https://assets.publishing.service.gov.uk/static/fonts/v1-b89238d840-tabular-bold-93bffa08f1c078b5d95e15683b5e77b9b3258297355710490228ddfb5f06f8a7.woff2") format("woff2"),url("https://assets.publishing.service.gov.uk/static/fonts/v1-784c21afb8-tabular-bold-d75e574d251becd00e5f90b6b4698042f9c8151ad228d20685f8be0b8c3d8589.woff") format("woff");font-weight:bold;font-style:normal;font-display:fallback} - diff --git a/assets/javascript/hmcts-webchat.js b/assets/javascript/hmcts-webchat.js index 8abbead..3525413 100644 --- a/assets/javascript/hmcts-webchat.js +++ b/assets/javascript/hmcts-webchat.js @@ -1,6 +1,5 @@ function parseText(text) { - const textArray = text.split('\n'); - return textArray; + return text.split('\n'); } function webchat_init(customParams) { @@ -76,7 +75,7 @@ function webchat_init(customParams) { additionalTextArray.forEach((line, index) => { const br = document.createElement('br'); - additionalTextLine = document.createTextNode(line); + const additionalTextLine = document.createTextNode(line); paragraph.appendChild(additionalTextLine); if (index < additionalTextArray.length - 1) { paragraph.appendChild(br);