PageSourceSearch

https://www.melett.de/wp-content/themes/meletttheme/assets/scripts…/services.js?v=1790063782

js melett.de collected 2026-10-06 06:38:57 UTC 6,562 bytes, 235 lines download raw bytes

1import {
2    getTranslation,
3} from "MelettCookieConsentTranslations";
4
5
6/**
7 * Non-translatable service configuration.
8 *
9 * Human-readable descriptions live in:
10 * assets/translations/cookie-consent/*.json
11 *
12 * Service/company names and URLs deliberately remain here because
13 * they are proper names/configuration rather than translated copy.
14 */
15const cookieConsentServices = {
16    targeting: {
17        id: 'targeting',
18
19        services: [
20            {
21                id: 'campaign-manager-360',
22                name: 'Campaign Manager 360',
23                owner: 'Google Inc.',
24                logo: 'campaign-manager-360.png',
25                websiteUrl:
26                    'https://marketingplatform.google.com/about/campaign-manager-360/',
27                privacyUrl:
28                    'https://business.safety.google/privacy/',
29                readMoreUrl:
30                    'https://support.google.com/campaignmanager/answer/2893966',
31            },
32
33            {
34                id: 'google-adsense',
35                name: 'Google AdSense',
36                owner: 'Google Inc.',
37                logo: 'google-adsense.png',
38                websiteUrl:
39                    'https://www.google.com/adsense/start/',
40                privacyUrl:
41                    'https://business.safety.google/privacy/',
42                readMoreUrl:
43                    'https://support.google.com/adsense/answer/7549925',
44            },
45
46            {
47                id: 'google',
48                name: 'Google Inc.',
49                owner: 'Google Inc.',
50                logo: 'google.png',
51                websiteUrl:
52                    'https://www.google.com/',
53                privacyUrl:
54                    'https://policies.google.com/privacy',
55                readMoreUrl:
56                    'https://policies.google.com/privacy',
57            },
58        ],
59    },
60
61
62    necessary: {
63        id: 'necessary',
64        required: true,
65
66        services: [
67            {
68                id: 'cloudflare',
69                name: 'Cloudflare',
70                owner: 'Cloudflare, Inc.',
71                required: true,
72                logo: 'cloudflare.png',
73                websiteUrl:
74                    'https://www.cloudflare.com/',
75                privacyUrl:
76                    'https://www.cloudflare.com/privacypolicy/',
77                readMoreUrl:
78                    'https://www.cloudflare.com/policies/privacy/',
79            },
80
81            {
82                id: 'jsdelivr',
83                name: 'jsDelivr',
84                owner: 'Volentio JSD Limited',
85                required: true,
86                logo: 'jsdelivr.png',
87                websiteUrl:
88                    'https://www.jsdelivr.com/',
89                privacyUrl:
90                    'https://www.jsdelivr.com/terms/privacy-policy',
91                readMoreUrl:
92                    'https://www.jsdelivr.com/terms/privacy-policy',
93            },
94
95            {
96                id: 'google-recaptcha',
97                name: 'Google reCAPTCHA',
98                owner: 'Google Inc.',
99                required: true,
100                logo: 'google-recaptcha.png',
101                websiteUrl:
102                    'https://cloud.google.com/security/products/recaptcha',
103                privacyUrl:
104                    'https://policies.google.com/privacy',
105                readMoreUrl:
106                    'https://policies.google.com/privacy',
107            },
108        ],
109    },
110
111
112    analytics: {
113        id: 'analytics',
114
115        services: [
116            {
117                id: 'google-analytics',
118                name: 'Google Analytics',
119                owner: 'Google Inc.',
120                logo: 'google-analytics.png',
121                websiteUrl:
122                    'https://marketingplatform.google.com/about/analytics/',
123                privacyUrl:
124                    'https://business.safety.google/privacy/',
125                readMoreUrl:
126                    'https://support.google.com/analytics/answer/11397207',
127            },
128
129            {
130                id: 'google-tag-manager',
131                name: 'Google Tag Manager',
132                owner: 'Google Inc.',
133                logo: 'google-tag-manager.png',
134                websiteUrl:
135                    'https://tagmanager.google.com/',
136                privacyUrl:
137                    'https://business.safety.google/privacy/',
138                readMoreUrl:
139                    'https://support.google.com/tagmanager/answer/9323295',
140            },
141        ],
142    },
143
144
145    functional: {
146        id: 'functional',
147
148        services: [
149            {
150                id: 'google-fonts',
151                name: 'Google Fonts',
152                owner: 'Google Inc.',
153                logo: 'google-fonts.png',
154                websiteUrl:
155                    'https://fonts.google.com/',
156                privacyUrl:
157                    'https://policies.google.com/privacy',
158                readMoreUrl:
159                    'https://policies.google.com/privacy',
160            },
161        ],
162    },
163};
164
165
166/**
167 * Return one category with its translated label.
168 *
169 * @param {string} categoryId
170 * @returns {object|null}
171 */
172function getCategory(categoryId) {
173    const category =
174        cookieConsentServices[categoryId];
175
176    if (!category) {
177        return null;
178    }
179
180    return {
181        ...category,
182        label: getTranslation(
183            `categories.${categoryId}.label`,
184            categoryId,
185        ),
186    };
187}
188
189
190/**
191 * Return one service with translated descriptive content.
192 *
193 * English fallback is already handled by translations.js.
194 *
195 * @param {string} categoryId
196 * @param {string} serviceId
197 * @returns {object|null}
198 */
199function getService(categoryId, serviceId) {
200    const category =
201        cookieConsentServices[categoryId];
202
203    if (!category) {
204        return null;
205    }
206
207    const service = category.services.find(
208        item => item.id === serviceId,
209    );
210
211    if (!service) {
212        return null;
213    }
214
215    const translation =
216        getTranslation(
217            `services.${serviceId}`,
218            {},
219        ) || {};
220
221    return {
222        ...service,
223        ...translation,
224        dataCollected: {
225            ...(translation.dataCollected || {}),
226        },
227    };
228}
229
230
231export {
232    cookieConsentServices,
233    getCategory,
234    getService,
235};

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.