1(function(){ 2 // Helper Functions 3 function userStatusHeader() { 4 var userStatus = document.getElementById('user_status'); 5 if(userStatus) { 6 var userStatusChildren = ''; 7 8 userStatusChildren += '<li class="header-user-status__item"><a class="header-user-status__link" href="/members/register/?redirect_url=/">Register</a></li> | '; 9 userStatusChildren += '<li class="header-user-status__item"><a class="header-user-status__link" rel="nofollow" href="/members/login/?redirect_url=/">Sign in</a></li> | '; 10 11 12 13 userStatusChildren += '<li class="header-user-status__item"><a class="header-user-status__link" id="header_localise_link" href="/localise/">Choose station</a></li>'; 14 15 16 17 userStatus.innerHTML = userStatusChildren; 18 } 19 } 20 21 function membersNavMobile() { 22 var membersNav = document.getElementById('members_nav_link'); 23 if(membersNav) { 24 var membersNavChildren = ''; 25 26 membersNavChildren += '<li><a rel="nofollow" class="user_login no-desktop" href="/members/login/?redirect_url=/">Sign in / Register</a></li>'; 27 28 29 membersNav.insertAdjacentHTML('afterend', membersNavChildren); 30 } 31 } 32 // Base Stuff 33 var gusto = window.gusto || {}; 34 35 gusto.udb_user={ 36 "is_authenticated": "False", 37 "grid": "", 38 "dob_year": "", 39 "gender": "", 40 "age_segment": "" 41 }; 42 43 // Current - GTM DataLayer UID method (Can be removed once GA is fully migrated) 44 if (window.dataLayer) dataLayer.push({"user": { 45 46 "loggedIn": false, 47 48 }}); 49 50 if (window.GLOBALADVERTISING){ 51 // Updating login state for advertising 52 window.GLOBALADVERTISING.loginstate = gusto.udb_user.grid ? "true" : "false"; 53 } 54 55 // Custom HTML 56 userStatusHeader(); 57 membersNavMobile(); 58})()
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.