Diferencia entre revisiones de «MediaWiki:Gadget-Arcanum-fancy-refs.js»
Ir a la navegación
Ir a la búsqueda
(begin) |
m (fix?) |
||
Línea 6: | Línea 6: | ||
console.debug('gadget:', 'Arcanum-fancy-refs') |
console.debug('gadget:', 'Arcanum-fancy-refs') |
||
+ | refs.forEach(function each_ref(ref) { |
||
− | for (const ref of refs) { |
||
console.log('make', ref, 'fancy') |
console.log('make', ref, 'fancy') |
||
− | } |
+ | }) |
}) |
}) |
Revisión del 18:10 19 abr 2020
mw.hook('wikipage.content').add(function titles_on_refs() { const refs = document.querySelectorAll('.reference-text .wob-ref') if (!refs || !refs.length) return console.debug('gadget:', 'Arcanum-fancy-refs') refs.forEach(function each_ref(ref) { console.log('make', ref, 'fancy') }) })