$(document).ready(function(){ let cieList = $(".button-cie-link"); if(cieList.length>0){ cieList.each(function(){ let href = $(this).attr('href'); href = href.replace("\/cie\/", "\/cie\/login-manager"); $(this).attr('href',href); }); $(".button-cie-link").on('click',function(event){ event.preventDefault(); let href = $(this).attr('href'); //iframe if ( self !== top ) { window.top.location.href = href; } else{ window.location.href=href; } }); } let spidList = $("#spid-idp-button-large-get"); /*if($(spidList).length > 0){ $(spidList).removeClass('position-absolute'); $(spidList).addClass('position-relative'); }*/ /* setTimeout(function(){ let idps = $(spidList).find('li > a'); if(idps.length>0){ idps.each(function(){ let href = $(this).attr('href'); href = href.replace("\/spid", "\/spid\/login-manager2"); $(this).attr('href',href + '&ipa_code=c_g224'); }); } $("#spid-idp-button-large-get > ul > li > a").on('click',function(event){ event.preventDefault(); let href = $(this).attr('href'); //iframe if ( self !== top ) { window.top.location.href = href; } else{ window.location.href=href; } }); },1000); */ let loginFormSpid = $("#spid-idp-button-large-get"); if(loginFormSpid.length>0){ let logoutBtn = $("#login-form-spid").find("div:eq(2) > a"); if(logoutBtn.length>0){ let hrefLogout = $(logoutBtn).attr('href'); if(hrefLogout == '/spid/logout'){ hrefLogout = hrefLogout.replace('/spid/logout','/logout'); $(logoutBtn).attr('href', hrefLogout); } } } });