« Module:MinecraftConnect » : différence entre les versions
De Nefald
Autres actions
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| Ligne 15 : | Ligne 15 : | ||
local adresseComplete = (port == '25565') and server or (server .. ':' .. port) | local adresseComplete = (port == '25565') and server or (server .. ':' .. port) | ||
-- Génération d'un ID unique | -- Génération d'un ID unique (CORRIGÉ) | ||
local uniqueId = 'mc-btn-' .. mw.hash('crc32', server .. port) | local uniqueId = 'mc-btn-' .. mw.hash.hashValue('crc32', server .. port) | ||
-- HTML du bouton | -- HTML du bouton | ||
| Ligne 26 : | Ligne 26 : | ||
:attr('title', 'Cliquer pour copier : ' .. mw.text.encode(adresseComplete)) | :attr('title', 'Cliquer pour copier : ' .. mw.text.encode(adresseComplete)) | ||
:wikitext(mw.text.encode(texte) .. ' 📋') | :wikitext(mw.text.encode(texte) .. ' 📋') | ||
return tostring(html) | return tostring(html) | ||