Discussion MediaWiki:Gadget-adddefinition.js

Le contenu de la page n’est pas pris en charge dans d’autres langues.
Définition, traduction, prononciation, anagramme et synonyme sur le dictionnaire libre Wiktionnaire.

This script won't work here without en:User:Conrad.Irwin/editor.js and the newNode function from en:Mediawiki:Common.js. --Yair rand 23 février 2011 à 10:45 (UTC)[répondre]

fait The window is working perfectly, but we can't save anything. JackPotte ($) 23 février 2011 à 19:18 (UTC)[répondre]
Hm, I think I see the problem. The script uses the target of the "edit" buttons in headers to find the part of the wikitext to change, and fr.wiktionary has some headers without edit buttons next to them. If you switch the line while(! /^h\d$/i.test(prevheader.nodeName)) for while(prevheader.nodeName != "H2"), it should work, I think. By the way, there is a mostly localized version of en:User:Conrad.Irwin/editor.js at Utilisateur:Sniff/editor.js. I noticed you added the line importScriptURI('//en.wiktionary.org/w/index.php?title=User:Yair_rand/editor.js&action=raw&ctype=text/js') to this script, and I don't think that's going to work well. The script has a lot of stuff that will only work for English Wiktionary, and it's not localized. I could try to copy it over here and modify it to work with French Wiktionary if you want, but importing it raw probably isn't a good idea. --Yair rand 23 février 2011 à 20:55 (UTC)[répondre]
fait Now it's completely finished, let' import it on the other Wiktionaries… Sourire JackPotte ($) 23 février 2011 à 22:16 (UTC)[répondre]