Index: gc_lang/fr/webext/content_scripts/init.js ================================================================== --- gc_lang/fr/webext/content_scripts/init.js +++ gc_lang/fr/webext/content_scripts/init.js @@ -99,19 +99,17 @@ When a textarea is added via jascript we add the menu :) */ this.xObserver = new MutationObserver(function (mutations) { mutations.forEach(function (mutation) { for (let i = 0; i < mutation.addedNodes.length; i++){ - if (mutation.addedNodes[i].getElementsByTagName) { - if (mutation.addedNodes[i].tagName == "TEXTAREA") { - oGrammalecte.lMenu.push(new GrammalecteMenu(oGrammalecte.nMenu, mutation.addedNodes[i])); - oGrammalecte.nMenu += 1; - } else { - for (let xNode of mutation.addedNodes[i].getElementsByTagName("textarea")) { - oGrammalecte.lMenu.push(new GrammalecteMenu(oGrammalecte.nMenu, xNode)); - oGrammalecte.nMenu += 1; - } + if (mutation.addedNodes[i].tagName == "TEXTAREA") { + oGrammalecte.lMenu.push(new GrammalecteMenu(oGrammalecte.nMenu, mutation.addedNodes[i])); + oGrammalecte.nMenu += 1; + } else if (mutation.addedNodes[i].getElementsByTagName) { + for (let xNode of mutation.addedNodes[i].getElementsByTagName("textarea")) { + oGrammalecte.lMenu.push(new GrammalecteMenu(oGrammalecte.nMenu, xNode)); + oGrammalecte.nMenu += 1; } } } }); });