From 8f26ec86d47902305da5b2782215250999b78e75 Mon Sep 17 00:00:00 2001 From: dchiamp Date: Thu, 15 Aug 2024 15:24:41 -0700 Subject: [PATCH 1/2] adds accessibe for testing --- nuxt.config.js | 3 ++- plugins/accessibe.client.js | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 plugins/accessibe.client.js diff --git a/nuxt.config.js b/nuxt.config.js index 257ecf2..b4ea4c0 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -63,7 +63,8 @@ export default { { src: "~/plugins/global-directive-loader.js" }, { src: "~/plugins/google-gtag.client.js", mode: "client" }, { src: "~/plugins/preview.client.js", mode: "client" }, - { src: "~/plugins/performant-events.client.js", mode: "client" } + { src: "~/plugins/performant-events.client.js", mode: "client" }, + { src: "~/plugins/accessibe.client.js", mode: "client" } //{ src: "~/plugins/web-font-loader.client.js", mode: "client" }, //{ src: "~/plugins/ip-geolocate.js" }, ], diff --git a/plugins/accessibe.client.js b/plugins/accessibe.client.js new file mode 100644 index 0000000..e1e0077 --- /dev/null +++ b/plugins/accessibe.client.js @@ -0,0 +1,37 @@ +export default () => { + (() => { + var s = document.createElement("script") + var h = document.querySelector("head") || document.body + s.src = "https://acsbapp.com/apps/app/dist/js/app.js" + s.async = true + s.onload = function () { + acsbJS.init({ + statementLink: "", + footerHtml: "", + hideMobile: false, + hideTrigger: false, + disableBgProcess: false, + language: "en", + position: "right", + leadColor: "#146FF8", + triggerColor: "#146FF8", + triggerRadius: "50%", + triggerPositionX: "right", + triggerPositionY: "bottom", + triggerIcon: "people", + triggerSize: "bottom", + triggerOffsetX: 20, + triggerOffsetY: 20, + mobile: { + triggerSize: "small", + triggerPositionX: "right", + triggerPositionY: "bottom", + triggerOffsetX: 10, + triggerOffsetY: 10, + triggerRadius: "20" + } + }) + } + h.appendChild(s) + })() +} From cce379156f8dff4376c3ad8189d928be7c842dd3 Mon Sep 17 00:00:00 2001 From: dchiamp Date: Thu, 15 Aug 2024 15:56:57 -0700 Subject: [PATCH 2/2] clean up acsb script --- plugins/accessibe.client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/accessibe.client.js b/plugins/accessibe.client.js index e1e0077..c460891 100644 --- a/plugins/accessibe.client.js +++ b/plugins/accessibe.client.js @@ -4,7 +4,7 @@ export default () => { var h = document.querySelector("head") || document.body s.src = "https://acsbapp.com/apps/app/dist/js/app.js" s.async = true - s.onload = function () { + s.onload = () => { acsbJS.init({ statementLink: "", footerHtml: "",