PageSourceSearch

https://www.eabeng.no/static/js/js-delfi-login.js?639253101820000000

js eabeng.no collected 2026-10-02 20:19:54 UTC 9,726 bytes, 1 lines download raw bytes

1function updateTrackingConsentVisibility(e){var i=(void 0!==e?e:$("#txtRegion").val()||"").trim().toLowerCase();i&&"undefined"!=typeof emarsysRegionConsent&&-1!==emarsysRegionConsent.indexOf(i)?($("#divTrackingConsent").removeClass("!hidden"),$("#divReviewConsent").removeClass("!hidden"),"undefined"!=typeof context&&"RegisterNew"===context&&$(".chkTrackingConsent").prop("checked",!1)):($("#divTrackingConsent").addClass("!hidden"),$("#divReviewConsent").addClass("!hidden"),$(".chkTrackingConsent").prop("checked",!0))}$(".DelfiLogin").click(function(e){$.ajax({url:"/api/slb/Delfi/DelfiLogin?account=false",type:"GET",success:function(e){window.location.href=e}})}),$("#btnLogout").click(function(e){Logout()}),$("#lnkLogout").click(function(e){Logout()}),$(".DelfiAccount").click(function(e){$.ajax({url:"/api/slb/Delfi/DelfiLogin?account=true",type:"GET",success:function(e){window.location.href=e}})}),window.selectedAffiliation="",window.selectedRegion="",window.selectRegisterRegion=function(e,i){$("#btnRegion").html(e),$("#ddlRegion").removeClass("show"),window.selectedRegion=i,updateTrackingConsentVisibility(i)},window.selectRegisterAffiliation=function(e,i){$("#btnAffiliation").html(e),$("#ddlAffiliation").removeClass("show"),"40"==i?$("#txtJobTitle").val("N/A"):"N/A"==$("#txtJobTitle").val()&&$("#txtJobTitle").val(""),window.setCookie("formAffiliation",e,18e5,"/",void 0),window.selectedAffiliation=i},window.selectAffiliation=function(e,i,t,n){$("#btnAffiliation").html(e),$("#ddlAffiliation").removeClass("show"),"40"==i&&""==$("#txtJobTitle").val()?$("#txtJobTitle").val("N/A"):"N/A"==$("#txtJobTitle").val()&&$("#txtJobTitle").val("")},window.selectRegion=function(e,i){$("#btnRegion").html(e),$("#ddlRegion").removeClass("show")},window.populateUserFields=function(e){$("#txtFirstName").val(e.firstName),$("#txtLastName").val(e.lastName),$("#txtJobTitle").val(e.jobTitle),$("#txtCompany").val(e.company),$("#txtEmail").val(e.email),$("#txtCity").val(e.city),$("#txtRegion").val(e.region),updateTrackingConsentVisibility(),populateAffiliateField(e.affiliation),populateSubscriptions(),e.isOptedOutOfEmailSubscriptions&&($("#divSubscriptions").hide(),$("#divOptedOut").show(),$("#divOptOutConfirm").hide())},window.populateAffiliateField=function(e){$("#ddlAffiliation .dropdown-items > a.dropdown-item").each(function(i){if($(this).attr("code")==e){let e=$(this).text();$("#btnAffiliation").html(e),window.setCookie("formAffiliation",e,18e5,"/",void 0)}})},window.populateRegionField=function(e){$("#ddlRegion .dropdown-items > a.dropdown-item").each(function(i){$(this).attr("code")==e&&$("#btnRegion").html($(this).text())})},$("#DelfiRegister").click(function(){function e(e){var i=$(e);return i.length?i.val().trim():""}var i=e("#firstName"),t=e("#lastName"),n="true"===$("#hidiscompany").val().toLowerCase(),o=""!==window.selectedAffiliation,c=""!==window.selectedRegion,a=""!==i||0===$("#firstName").length,s=""!==t||0===$("#lastName").length;if(o&&c&&a&&s&&!n||o&&a&&s&&n){$("#divValidationError").addClass("!hidden");var r={Affiliation:$("#btnAffiliation").text(),Region:window.selectedRegion,IsAdd:!0};a&&(r.FirstName=i),s&&(r.LastName=t);var d=JSON.stringify(r);$.ajax({type:"POST",url:"/api/slb/Delfi/DelfiUserAddAndUpdate",contentType:"application/json",data:d,success:function(e){$(".chkSilverpop").length>0?SubscriptionRegisterPage(e):window.location.href=e}})}else $("#divValidationError").removeClass("!hidden")}),$("#DelfiAccount").click(function(){if(""==getCookie("d_auth"))window.location.href="/";else{var e=$("#btnAffiliation").text();if(""!=e){var i=JSON.stringify({Affiliation:e,IsAdd:!1});$.ajax({type:"POST",url:"/api/slb/Delfi/DelfiUserAddAndUpdate",contentType:"application/json",data:i,success:function(e){window.location.href=e}})}}}),$("#btnDelfiDeactivate").click(function(){if(""==getCookie("d_auth"))window.location.href="/";else{var e=$("#chkDeactivate").is(":checked");if(""!=e&&1==e){$("#divDeactivateError").hide();var i=JSON.stringify({Deactivate:e});$.ajax({type:"POST",url:"/api/slb/Delfi/DelfiDeactivateUser",contentType:"application/json",data:i,success:function(e){document.cookie="dat_ac=; path=/; domain=.slb.com; expires=Thu, 01 Jan 1970 00:00:00 GMT",document.cookie="d_auth=; path=/; domain=.slb.com; expires=Thu, 01 Jan 1970 00:00:00 GMT",window.location.href=e}})}else $("#divDeactivateError").show()}}),jQuery(document).ready(function(){if("undefined"!=typeof context&&"DelfiAccount"==context)if(""==getCookie("d_auth"))window.location.href="/";else{$.ajax({url:"/api/slb/Delfi/GetUserProfile",type:"GET",success:function(e){if(null==e.id)window.location.href=e;else{var i={id:e.id,isPremium:e.premiumContent,email:e.email,firstName:e.firstName,middleInitial:e.middleInitial,lastName:e.lastName,isActive:e.active,preferredLanguage:e.preferredLanguage,city:e.city,region:e.regionCountry,areaOfInterest:e.areaOfInterest,affiliation:e.affiliation,phoneNumber:e.phoneNumber,company:e.company,jobTitle:e.jobTitle,isOptedOutOfEmailSubscriptions:e.isOptedOutOfEmailSubscriptions,ssoSequenceNumber:e.ssoSequenceNumber};1==e.premiumContent?$(".premium-info").show():$(".premium-info").hide(),populateUserFields(i)}}}),jQuery("#btnSubscribe").click(function(e){e.preventDefault(),$("#divUpdateSubscriptionsSuccess").hide(),subscribe()}),jQuery("#ReviewTrackLink").click(function(e){e.preventDefault();var i=$("#divTrackingConsent");i.length&&$("html, body").animate({scrollTop:i.offset().top-100},500)}),jQuery("#chkOptOut").change(function(e){$("#chkOptOut").is(":checked")?$("#divSubscriptions").hide():$("#divSubscriptions").show()})}}),window.subscribe=function(e){var i=new Array;$(".chkSilverpop").each(function(){var t=!1;if($("#chkOptOut").is(":checked")||(t=$(this).is(":checked")),void 0!==e&&(t=!1),void 0!==$(this).attr("code")){var n={emarsysId:$(this).attr("code"),isSubscribed:t};i.push(n)}});var t=$(".chkTrackingConsent");t.length&&i.push({emarsysId:t.attr("data-code"),isSubscribed:t.is(":checked")});var n="/api/slb/Delfi/PostSubscriptions";if($.ajax({type:"POST",url:n,contentType:"application/json",data:JSON.stringify(i),success:function(e){$("#btnSubscribe").fadeOut(1e3,function(){$("#divUpdateSubscriptionsSuccess").fadeIn(1e3,function(){$("#divUpdateSubscriptionsSuccess").fadeOut(1e3,function(){$("#btnSubscribe").fadeIn(1e3)})})})},error:function(e){}}),$("#chkOptOut").is(":checked")){n="/api/slb/Delfi/SubscriptionsOptOut";$.ajax({type:"GET",url:n,success:function(e){$(".chkSilverpop").attr("disabled",!0),$(".chkSilverpop").removeAttr("checked"),$("#divSubscriptions").hide(),$("#divOptedOut").show(),$("#divOptOutConfirm").hide(),$("#divUpdatePreferences").hide()},error:function(e){console.log("Error opting out: "+e)}})}return!1},window.populateSubscriptions=function(){$.ajax({type:"GET",url:"/api/slb/Delfi/GetSubscriptions",success:function(e){$.each(e,function(){$.each(e,function(i){1==e[i].isSubscribed&&($(`[code|='${e[i].emarsysId}']`).prop("checked",!0),$(`[data-code='${e[i].emarsysId}']`).prop("checked",!0))})}),window._subscription_form&&window._subscription_form.updateTopicsVisibility()},error:function(e){}})},window.Logout=function(){$.ajax({url:"/api/slb/Delfi/DelfiLogout",type:"GET",success:function(e){document.cookie="dat_ac=; path=/; domain=.slb.com; expires=Thu, 01 Jan 1970 00:00:00 GMT",document.cookie="d_auth=; path=/; domain=.slb.com; expires=Thu, 01 Jan 1970 00:00:00 GMT",localStorage.clear(),sessionStorage.clear(),window.location.href=e}})},window.getCookie=function(e){for(var i=e+"=",t=decodeURIComponent(document.cookie).split(";"),n=0;n<t.length;n++){for(var o=t[n];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(i))return o.substring(i.length,o.length)}return""},window.SubscriptionRegisterPage=function(e){var i=new Array;const t=document.querySelector("#unsubscribe");$(".chkSilverpop").each(function(){var e;e=$(this).is(":checked");var n=$(this).attr("code");if(void 0!==n){var o={emarsysId:n,isSubscribed:e};t.checked&&i.push(o),!t.checked&&o.isSubscribed&&i.push(o)}});var n=$(".chkTrackingConsent");n.length&&i.push({emarsysId:n.attr("data-code"),isSubscribed:n.is(":checked")});$.ajax({type:"POST",url:"/api/slb/Delfi/PostSubscriptions",contentType:"application/json",data:JSON.stringify(i),success:function(i){window.location.href=e},error:function(e){}})},window.addEventListener("load",function(){document.querySelectorAll("#ddlAffiliation .dropdown-items .dropdown-item").forEach(e
1=>{e.addEventListener("click",()=>{window.selectRegisterAffiliation(e.textContent,e.getAttribute("code"))})}),document.querySelectorAll("#ddlRegion .dropdown-items .dropdown-item").forEach(e=>{e.addEventListener("click",()=>{window.selectRegisterRegion(e.textContent,e.getAttribute("data-code"))})});let e=this.document.querySelector(".sign-in-text"),i=this.document.querySelector(".DelfiAccount span");e&&i&&window.getCookie("d_auth")&&(i.textContent=e.value);const t=this.document.querySelector(".js-desktop-global-nav .DelfiAccount span.text-element"),n=this.document.querySelector(".js-desktop-global-nav .DelfiAccount span.icon-font-log-in");t&&e&&n&&window.getCookie("d_auth")&&(t.textContent=e.value,n.className="icon-font-account-circle-white before:content-['\\\\e902'] pointer-events-none");const o=this.document.querySelector(".js-dropdown.DelfiAccount span.text-element"),c=this.document.querySelectorAll(".js-dropdown.DelfiAccount span.click-through");o&&e&&c.length>1&&window.getCookie("d_auth")&&(o.textContent=e.value,c[0].className="click-through clicked icon-font-account-circle-white before:content-['e902'] pointer-events-none",c[0].textContent="",c[1].className="click-through active-click icon-font-account-circle-white before:content-['e902'] pointer-events-none")});

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.