Diferencia entre revisiones de «MediaWiki:Gadget-artist-portal.js»

Cambiar Coppermind:Artists por Coppermind:Artistas
m (pass in content to jQuery things)
(Cambiar Coppermind:Artists por Coppermind:Artistas)
 
mw.hook('Coppermind:ArtistsArtistas').add(function artist_portal(content) {
 
console.debug('artist-portal:', content)
 
Array.from(jQuery('a[title^="Coppermind:ArtistsArtistas/"]',content)).forEach(function each_artist(el) {
// replace text with artist name
el.innerText = el.innerText.replace('Coppermind:ArtistsArtistas/','')
})
 
Array.from(jQuery('a[title^="Coppermind:ArtistsArtistas/"]',content).closest('ul')).forEach(function sort_list(ul) {
const kids = Array.from(ul.children)
console.debug('sorting:', kids.length, 'elements from', ul)