swedbank-pay-design-guide-jekyll-theme 2.8.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a241b41ef780ab4bb540e8ab49ad97265135c62a5d971e0e7f6e1ca78761c495
4
- data.tar.gz: af77e0e3bae0d8b87728d8f2ac71a4a39fb0b4557e5c62322e0c10a0efe258af
3
+ metadata.gz: c0a8016ef43331a548ba4a8cc985b0788d2d4814c9ca8207e2309a2c3757d7c5
4
+ data.tar.gz: b4ede1bff762c593b966430884a83973936e07e5831f6729a6f78c70254af824
5
5
  SHA512:
6
- metadata.gz: 5469b72bac374a6828b7f7caab6324b461a82c6fb8fd8b52fe1d8e8c45af7792862ff57eded9fb4c26f880e9865c6f09b02d6cfa12ef6fec92a04f021e6a04e1
7
- data.tar.gz: 555caaa47cac1e5f036a9ef9ece4cbd212a8bdbb66da1d5ce2965501e7dff073971ed3a24e0ceeeb4212061ff05f612695e7c3106a2b95799b7411cbd2844dd7
6
+ metadata.gz: 1fc5f863d71f7483659380ea5f366d9dcea1f9f742833b72340064c2f0ce4158090ea7220f1c30bb5dd61abb273a9a3cddd57022420711cd77c21cf2807f1cc1
7
+ data.tar.gz: e9bc7565916cc415bd2b3b490a083480690b275e21992547b18758231971f43d7ca2b7aa211093afcaad1a4987aac4e9f949a4edfb0ecc2330d9976f78616786
@@ -119,6 +119,7 @@
119
119
  </div>
120
120
  <script src="{{ design_guide_url }}/scripts/dg.js" global="true" autoload="true"></script>
121
121
  <script src="{{ '/assets/js/swedbank-pay-design-guide-theme.js' | relative_url }}"></script>
122
+ <script src="{{ '/assets/js/cookie-consent.js' | relative_url }}"></script>
122
123
  {%- if site.google_analytics.tracking_id %}
123
124
  {% include google_analytics.html %}
124
125
  {%- endif %}
@@ -0,0 +1,50 @@
1
+ // Ensure DOM is ready before manipulating it
2
+ if (document.readyState === 'loading') {
3
+ document.addEventListener('DOMContentLoaded', initCookieConsent);
4
+ } else {
5
+ initCookieConsent();
6
+ }
7
+
8
+ function initCookieConsent() {
9
+ if (location.host === "developer.swedbankpay.com") {
10
+ var script = document.createElement('script');
11
+ script.src = 'https://cdn.consentmanager.net/delivery/js/semiautomatic.min.js';
12
+ script.type = "text/javascript";
13
+ script.setAttribute("data-cmp-ab", "1");
14
+ script.setAttribute("data-cmp-host", "d.delivery.consentmanager.net");
15
+ script.setAttribute("data-cmp-cdn", "cdn.consentmanager.net");
16
+ script.setAttribute("data-cmp-cdid", "4da9d0f9328c3");
17
+ script.setAttribute("data-cmp-codesrc", "0");
18
+ document.body.appendChild(script);
19
+ }
20
+ }
21
+
22
+ // Clarity script - do not change
23
+ (function (c, l, a, r, i, t, y) {
24
+ c[a] = c[a] || function () { (c[a].q = c[a].q || []).push(arguments) };
25
+ t = l.createElement(r); t.async = 1; t.src = "https://www.clarity.ms/tag/" + i;
26
+ y = l.getElementsByTagName(r)[0]; y.parentNode.insertBefore(t, y);
27
+ })(window, document, "clarity", "script", "jd3awxna38");
28
+ // End of Clarity script
29
+
30
+ function updateConsent(e, o) {
31
+ var clarityVendorId = "s2631";
32
+ var result = __cmp('getCMPData');
33
+ if ("vendorConsents" in result) {
34
+ if (clarityVendorId in result.vendorConsents && result.vendorConsents[clarityVendorId]) {
35
+ window.clarity("consentv2", { analytics_Storage: "granted" });
36
+ } else {
37
+ window.clarity("consentv2", { analytics_Storage: "denied" });
38
+ }
39
+ }
40
+ }
41
+
42
+ function initCMP() {
43
+ if (typeof __cmp !== 'undefined') {
44
+ __cmp("addEventListener", ["consent", updateConsent, false], null);
45
+ } else {
46
+ setTimeout(initCMP, 100);
47
+ }
48
+ }
49
+
50
+ initCMP();
data/lib/gem_version.rb CHANGED
@@ -4,7 +4,7 @@ module Gem
4
4
  # Gem Specification
5
5
  class Specification
6
6
  def self.gem_version
7
- '2.8.0'
7
+ '2.8.1'
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swedbank-pay-design-guide-jekyll-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swedbank Pay
@@ -462,6 +462,7 @@ files:
462
462
  - assets/img/flag-dk.svg
463
463
  - assets/img/flag-no.svg
464
464
  - assets/img/flag-se.svg
465
+ - assets/js/cookie-consent.js
465
466
  - assets/js/mermaid.min.js
466
467
  - assets/js/swedbank-pay-design-guide-theme.js
467
468
  - assets/puml-theme-swedbankpay.puml