PageSourceSearch

https://www.sais.edu.sg/wp-content/plugins/gravityforms-dynamics/js/journeyId_script.js?ver=1.0.1

js sais.edu.sg collected 2026-10-02 07:11:18 UTC 1,712 bytes, 42 lines download raw bytes

1// placeholder for javascript
2
3// To Get _ga cookie value clientID from the browser where used GTM.
4function readCookie(cookieName) {
5	var re = new RegExp('[; ]'+cookieName+'=([^\\s;]*)');
6	var sMatch = (' '+document.cookie).match(re);
7	if (cookieName && sMatch) return unescape(sMatch[1]);
8	return '';
9}
10var gaCookieValue      = readCookie('_ga');
11var cognitaCookieValue = readCookie('cognita_id');
12
13// set cookie value on load
14jQuery(".sag_journeyid :input").val(gaCookieValue);
15jQuery(".sag_cognitaid :input").val(cognitaCookieValue);
16
17
18// Get CookieConsent 
19var CookieConsentValue = readCookie('CookieConsent');
20// {stamp:'bln/M1/66qRVXohN0fpV6xgWfS7wDBXfWpg1gILG+XCK7Hlz3dv9Kg==',necessary:true,preferences:false,statistics:false,marketing:false,method:'explicit',ver:1,utc:1700644489124,region:'in'}
21
22let arr = CookieConsentValue.split(',');
23
24 // Check if the array has the expected number of elements
25 if (arr.length >= 5) {
26	var arr_necessary = arr[1].split(':');
27	var arr_preferences = arr[2].split(':');
28	var arr_statistics = arr[3].split(':');
29	var arr_marketing = arr[4].split(':');
30
31	// Check if each array element has the expected structure
32	var cbc_necessary = arr_necessary[1] ? arr_necessary[1] : ''; // default to empty string if undefined
33	var cbc_preferences = arr_preferences[1] ? arr_preferences[1] : '';
34	var cbc_statistics = arr_statistics[1] ? arr_statistics[1] : '';
35	var cbc_marketing = arr_marketing[1] ? arr_marketing[1] : '';
36
37	// Set CookieConsent value on load
38	jQuery(".cbc_necessary :input").val(cbc_necessary);
39	jQuery(".cbc_preferences :input").val(cbc_preferences);
40	jQuery(".cbc_statistics :input").val(cbc_statistics);
41	jQuery(".cbc_marketing :input").val(cbc_marketing);
42}

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.