govuk_publishing_components 21.15.2 → 21.16.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 06c37091574f949ad8140b3d67416f86d27c2b30051a22b5677e9741db034275
|
|
4
|
+
data.tar.gz: a4341467f69fc573e80513a05dd7cb7ea6664712dc88e88e6f8832407f738a00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92e2283dbb3527522729b82d2030955805c70ad29f2270aff0dbb663cb8d2b7a3107ea08b8de8f749a543b46e4b58d20ba4846380fb0d004b8d55b27672df07c
|
|
7
|
+
data.tar.gz: b6d85184eef98c6582c794e7726ae4289a1bbd0ac3382958d039c84364a9aedb4ea39101a6c0c078a93afcdf2d40fd627ab970aaa177df8bde9d9adcdd691075
|
|
@@ -111,13 +111,7 @@
|
|
|
111
111
|
if (!options[cookieType]) {
|
|
112
112
|
for (var cookie in COOKIE_CATEGORIES) {
|
|
113
113
|
if (COOKIE_CATEGORIES[cookie] === cookieType) {
|
|
114
|
-
window.GOVUK.
|
|
115
|
-
|
|
116
|
-
if (window.GOVUK.cookie(cookie)) {
|
|
117
|
-
// We need to handle deleting cookies on the domain and the .domain
|
|
118
|
-
document.cookie = cookie + '=;expires=' + new Date() + ';'
|
|
119
|
-
document.cookie = cookie + '=;expires=' + new Date() + ';domain=' + window.location.hostname + ';path=/'
|
|
120
|
-
}
|
|
114
|
+
window.GOVUK.deleteCookie(cookie)
|
|
121
115
|
}
|
|
122
116
|
}
|
|
123
117
|
}
|
|
@@ -198,4 +192,29 @@
|
|
|
198
192
|
}
|
|
199
193
|
return null
|
|
200
194
|
}
|
|
195
|
+
|
|
196
|
+
window.GOVUK.deleteCookie = function (cookie) {
|
|
197
|
+
window.GOVUK.cookie(cookie, null)
|
|
198
|
+
|
|
199
|
+
if (window.GOVUK.cookie(cookie)) {
|
|
200
|
+
// We need to handle deleting cookies on the domain and the .domain
|
|
201
|
+
document.cookie = cookie + '=;expires=' + new Date() + ';'
|
|
202
|
+
document.cookie = cookie + '=;expires=' + new Date() + ';domain=' + window.location.hostname + ';path=/'
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
window.GOVUK.deleteUnconsentedCookies = function () {
|
|
207
|
+
var currentConsent = window.GOVUK.getConsentCookie()
|
|
208
|
+
|
|
209
|
+
for (var cookieType in currentConsent) {
|
|
210
|
+
// Delete cookies of that type if consent being set to false
|
|
211
|
+
if (!currentConsent[cookieType]) {
|
|
212
|
+
for (var cookie in COOKIE_CATEGORIES) {
|
|
213
|
+
if (COOKIE_CATEGORIES[cookie] === cookieType) {
|
|
214
|
+
window.GOVUK.deleteCookie(cookie)
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
201
220
|
}(window))
|