/*prendo il link principale*/ var idw_link = document.getElementById('idw-link-ptP0h6'); idw_link.href = idw_link.href+'?widget=ptP0h6'; idw_link.setAttribute("rel", "nofollow"); /*mi creo il widget*/ var idw = document.createElement('div'); idw.className = 'idw idw-simple medico'; idw.innerHTML = '
Dr.ssa Ingrid Hugnet
Psicologo
Prenota una visita
'; idw_link.parentNode.insertBefore(idw, idw_link); /*sposto il link principale nel posto corretto*/ var idw_top_spec = idw.getElementsByClassName('idw-top-spec')[0]; if (idw_top_spec) { idw_top_spec.parentNode.insertBefore(idw_link, idw_top_spec); } else { //remove the link idw_link.parentNode.removeChild(idw_link); } /*creo il css se non esiste*/ if(!document.getElementById('idw-css')) { var idw_css = document.createElement("link"); idw_css.type = "text/css"; idw_css.rel = "stylesheet"; idw_css.id = 'idw-css'; idw_css.href = "https://www.idoctors.it/assets/css/widget.css"; document.body.appendChild(idw_css); } window.idoShowOtherRecensioni = function(idoBtn) { var recensioni = document.querySelectorAll('.idw-footer.recensioni .recensione'); for (var i = 0; i < recensioni.length; i++) { recensioni[i].style.display = 'block'; } idoBtn.style.display = 'none'; }