PageSourceSearch

https://osmaps.com/scripts/cookie-control.js

js osmaps.com collected 2026-09-24 09:00:25 UTC 9,158 bytes, 234 lines download raw bytes

1/* eslint-disable */
2(() => {
3  const BRANDING = {
4    fontFamily: "Hanken Grotesk Variable, Arial, sans-serif",
5    fontColor: '#000',
6    backgroundColor: '#f4f4f4',
7    fontSizeTitle: "1.2em",
8    fontSizeIntro: "1em",
9    fontSizeHeaders: "1em",
10    fontSize: "1em",
11    toggleText: '#fff',
12    toggleColor: '#999',
13    toggleBackground: '#333',
14    buttonIcon: null,
15    buttonIconWidth: '64px',
16    buttonIconHeight: '64px',
17    removeIcon: true,
18    removeAbout: true,
19    acceptBackground: '#453c90',
20    acceptText: '#fff',
21    rejectBackground: '#453c90',
22    rejectText: '#fff',
23  };
24
25  const COOKIE_CONTROL = {
26    apiKey: '8293cb1d0315e4d8f67140007aa8cc854a704732',
27    product: 'CUSTOM',
28    mode: 'gdpr',
29    sameSiteValue: 'Lax',
30    subDomains: true,
31    closeStyle: 'button',
32    initialState: 'NOTIFY',
33    acceptBehaviour: 'all',
34    notifyDismissButton: false,
35    setInnerHTML: true,
36    onLoad: cookieInit,
37    text: {
38      closeLabel: 'Save and close',
39      acceptSettings: 'Accept',
40      rejectSettings: 'Reject',
41      title: 'Ordnance Survey cookie use',
42      intro:
43        "Cookies are files saved on your phone, tablet or computer when you visit a website. They store information about how you use the website, such as the pages you visit.\nWe use some essential cookies to make this website work. We'd like to set additional cookies to understand how you use Ordnance Survey's websites and applications, remember your settings and improve our services. We also use cookies set by other sites to help us deliver content from their services.",
44      necessaryTitle: 'Strictly necessary',
45      necessaryDescription:
46        "These essential cookies enable core functionality such as security, network management, and accessibility. You may disable these by changing your browser settings, but this may affect how the website functions.",
47      settings: 'Let me choose',
48      notifyTitle: "We use cookies to improve your user experience",
49      notifyDescription:
50        '<p>Select "Accept" or "Reject" to enable or disable optional cookies, or "Let me choose" to pick which types to accept or reject.</p><p><a href="https://www.ordnancesurvey.co.uk/cookies/">Cookie policy</a></p>',
51      accept: 'Accept',
52      reject: 'Reject',
53    },
54    statement: { 
55      description: 'For more information visit our', 
56      name: 'Cookies page', 
57      url: 'https://www.ordnancesurvey.co.uk/cookies', 
58      updated: '24/04/2026' 
59    },
60    necessaryCookies: [
61      "x-ms-cpim*",
62      "ASLBSA", 
63      "ASLBSACORS", 
64      "CookieControl"
65    ],
66    optionalCookies: [
67      {
68        name: 'performance',
69        label: 'Performance',
70        description:
71          "Performance cookies allow us to update this website to cater for user preferences and improve performance. They collect information about how this website is used, e.g. which pages users visit most often and where error messages are delivered. These typically collect and process information at an aggregated and often anonymous level.",
72        cookies: [
73          '_ga_*',
74          'QSI*',
75          'QST',
76          'AMP_*',
77          'AMP_MKTG_*',
78          '_ga',
79          '_gat',
80          '_gat_UA-8207971-28',
81          '_gid',
82          '_ga_ZDLM2MBHHG', 
83          '_clck', 
84          '_clsk', 
85          'CLID', 
86          'MUID', 
87          'zab_*', 
88          'zabUserID', 
89          'zabVisitID', 
90          'zabSplit', 
91          'zabBucket', 
92          'zabHMBucket', 
93          'zpsfa_*', 
94          'zfa*', 
95          'zsr*', 
96          'zabme', 
97          'zsd*', 
98          'ps_payloadSeqId', 
99          'zabPZBucket', 
100          'zPersonalization', 
101          'zia_*', 
102          'zpc*', 
103          'zps_permission_status', 
104          '*popup', 
105          'zps-tgr-dts', 
106          'zpspolls_*', 
107          'zpsPollsBucket', 
108          'zpspb*', 
109          'zpsPopupBucket', 
110          'zpssr*', 
111          'payloadQueue', 
112          'tabUid',
113        ],
114        onAccept: function() { pushCookieEvent('performance', 'accepted'); },
115        onRevoke: function() { pushCookieEvent('performance', 'revoked'); }
116    }, {
117        name: 'functionality',
118        label: 'Functionality',
119        description:
120          "Functional cookies allow this website to remember the choices you make e.g. language preferences and any customisations you make to website pages during your visit. They assist in providing features and services specific to individual users.",
121        cookies: [
122          "psCurrentState",
123          "__cf_bm",
124          "_cfuvid",
125          "VISITOR_INFO1_LIVE",
126          "VISITOR_PRIVACY_METADATA",
127          "YSC",
128          "LP-303F4AFE9B3307612I1HCEBC763916FBBBC0",
129          "Survey-Started-334209",
130          "responder-2I1H-736",
131          "cf_clearance",
132          "PREF",
133          "ab._gd",
134        ],
135        onAccept: function() { pushCookieEvent('functionality', 'accepted'); },
136        onRevoke: function() { pushCookieEvent('functionality', 'revoked'); }
137    }, {
138        name: 'targeting',
139        label: 'Targeting',
140        description:
141          "These cookies do things like show you content and promotions that are relevant to you while browsing the Ordnance Survey websites and other sites on the internet. It helps to limit the number of times those adverts are served to you and measure the effectiveness of campaigns. Switching off these cookies won’t reduce the number of promotions you see but will mean they are less personalised.",
142        cookies: [
143          "_hjSession*",
144          "2I1H-8KY-Dismissed",
145          "2I1H-8KY-Completed",
146          "ab.storage.*",
147          "ab.optOut"
148        ],
149        onAccept: function() { pushCookieEvent('targeting', 'accepted'); },
150        onRevoke: function() { pushCookieEvent('targeting', 'revoked'); }
151      }
152    ],
153    position: 'LEFT',
154    theme: 'LIGHT',
155    branding: BRANDING,
156    accessibility: { outline: false },
157  };
158
159  function pushCookieEvent(type, state) {
160    window.dataLayer = window.dataLayer || [];
161    dataLayer.push({
162      civicuk_cookie_control: { [type]: state },
163      eventCategory: "navigation",
164      eventAction: `click: ${type} cookies`,
165      eventLabel: `${type} cookie ${state}`,
166      eventValue: 0,
167      eventNonInteractive: !0,
168      event: "gtm_click_updateCookies"
169    });
170  };
171
172  function cookieInit() {
173    //Make all 3 banner buttons the same style, so as not to influence choice but move reject button position to help avoid accidental activations
174    const choiceButton = document.querySelector(
175      "#ccc-notify > div.ccc-notify-buttons > button:nth-child(3)",
176    );
177    if (choiceButton !== null) {
178      choiceButton.classList.toggle("ccc-notify-link");
179      choiceButton.classList.add("ccc-accept-button");
180      document.getElementById("ccc-notify-reject").before(choiceButton);
181    }
182
183    //Accessibility fix. Adjust sidebar width to cater for text increase of upto 400%
184    const slideOutWidth = "90%";
185    if (
186      parseInt(
187        window.getComputedStyle(document.getElementsByTagName("body")[0])
188          .fontSize,
189      ) > 50
190    ) {
191      slideOutWidth = "80%";
192    }
193
194    //Accessibility fix. Change focus outline style plus element spacing adjustments.
195    const focusRules = document.createElement("style");
196    focusRules.appendChild(
197      document.createTextNode(
198        "#ccc *:focus {outline: none !important; box-shadow: 0 0 0 .2rem #fb0, 0 0 0 .4rem #333 !important;}" +
199          ".checkbox-toggle-label:focus-within {outline: none !important; box-shadow: 0 0 0 .2rem #fb0, 0 0 0 .4rem #333 !important;}" +
200          "#ccc .optional-vendor-heading {text-decoration: none;}" +
201          ".ccc-vendor-reveal {margin-bottom: 2em !important;}" +
202          "#ccc-notify-accept {margin-right: 1rem !important;}" +
203          ".ccc-notify-text a {text-decoration: underline !important;}" +
204          ".ccc-notify-text a:hover {text-decoration: none !important;}" +
205          "#ccc .checkbox-toggle--slider .checkbox-toggle-off {opacity: 1;}" +
206          "#ccc .ccc-content--light .ccc-notify-button, #ccc .ccc-content--light .ccc-notify-button span {color: #757575;border-color: #757575;}" +
207          "#ccc-module.ccc-module--slideout {width: " +
208          slideOutWidth +
209          ";max-width: 620px;}",
210      ),
211    );
212    document.getElementsByTagName("head")[0].appendChild(focusRules);
213
214    //Accessibility fix. Set focus for first time and returning visitors.
215    if (document.querySelector("#ccc-notify a") !== null) {
216      document.querySelector("#ccc-notify a").focus();
217    } else if (document.getElementById("ccc-icon") !== null) {
218      document.getElementById("ccc-icon").setAttribute("tabindex", 1);
219    }
220  }
221
222  // Load the cookie control script
223  const load = (src) => new Promise((resolve) => {
224    const script = document.createElement('script');
225    script.src = src;
226    script.onload = resolve;
227    document.head.appendChild(script);
228  });
229
230  const timestamp = Date.now();
231
232  load(`https://www.ordnancesurvey.co.uk/os-js/cookie-control/cookie-control.min.js?${timestamp}`)
233    .then(() => CookieControl.load(COOKIE_CONTROL));
234})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.