diff --git a/koha_bibagos.user.js b/koha_bibagos.user.js index 12921b3bbc0c89c3cc56514bb5609ccfd2462857..aa864ca52bb99965dff09fb6f200919e7b67cea3 100644 --- a/koha_bibagos.user.js +++ b/koha_bibagos.user.js @@ -134,9 +134,13 @@ d.parentNode.insertBefore(selectionDiv, d); } - function personnaliseAjoutNotice() { + function personnaliseAjoutNotice(n) { var categorieActuelle = document.querySelector("#toolbar a.change-framework").attributes["data-frameworkcode"].nodeValue; - if (categorieActuelle != "BOOK") { + console.log("n="+n+" : "+categorieActuelle); + if (n > 0) setTimeout( () => {personnaliseAjoutNotice(n-1);}, 100); + + /* + if (categorieActuelle != "BOOK") { document.querySelector("#settings-menu a[data-frameworkcode='BOOK']").click(); } else { @@ -149,7 +153,8 @@ categorie.value = "BD"; categorie.querySelector("option[value='BD']").selected=1; categorie.dispatchEvent(new Event('change')) - } + } + */ } /* Déclenchement des actions au chargement de la page */ @@ -163,6 +168,6 @@ afficheProfilsPermissions(); } if (/addbiblio.pl/.test(window.location.href)) { - personnaliseAjoutNotice(); + personnaliseAjoutNotice(100); } })();