JSFiddle - React, Tailwind, and code Playground

by Luis Martin

JavaScript

window.fechaEfect;
jQuery("body").on("mousedown", ".eco_botonSiguiente:contains('Calcula tu presupuesto')", function() {
  sessionStorage.setItem('fechaEfect', jQuery(".eco_fecha_efecto select").val());
});


jQuery("head").append('<style>\
	#gwt-root-axa div#collapsePanelCoberturas span.txtOrange{\
		color:#d9643f !important;\
	}\
	.optiPromo.grande {\
	    text-align: center !important;\
	    padding: 6px 0 !important;\
	}\
</style>');

try {

  function seleccionPaso() {
    console.log("DV - seleccionar paso");
    switch (window.location.hash) {
      case "#tari":
        console.log("DV - tarificacion");
        var checkExist2 = setInterval(function() {
          if (jQuery("#collapsePanelCoberturas").length) {
            clearInterval(checkExist2);
            console.log("DV - Existe bloque");
            if (jQuery("span:contains('Aprovéchate de la promoción e incluye la cobertura dental')").length > 0) {
              console.log("DV - añadir clase");
              jQuery("span:contains('Aprovéchate de la promoción e incluye la cobertura dental')").addClass("txtOrange");
            } else {
              console.log("DV - crear texto");
              jQuery("#collapsePanelCoberturas").prepend("<p style='font-family:\"Conv_ITCFranklinGothicStd-MdCd\", Arial, Helvetica, sans-serif !important;color:#d9643f; font-size:15px;margin-bottom: 0 !important;text-align:center;'>Aprovéchate de la promoción e incluye la cobertura dental por 3,50€ al mes</p>");
            }
          }
        }, 100);
        break;
      case "#cont":
        jQuery("head").append('<style>\
			    	.banner-pro{\
						display:block;\
			    	}\
			    </style>');
        break;
      case "#offe":
        var checkExist = setInterval(function() {
          if (jQuery('.eco_baseViewContainer input').length && (sessionStorage.getItem('fechaEfect') == "20181001" || sessionStorage.getItem('fechaEfect') == "20181101" || sessionStorage.getItem('fechaEfect') == "20181201" ||...