MediaWiki:Common.js: Difference between revisions
No edit summary |
No edit summary |
||
| Line 23: | Line 23: | ||
$.getScript( 'https://unpkg.com/tippy.js@6', function() { | $.getScript( 'https://unpkg.com/tippy.js@6', function() { | ||
tippy('[data-tippy-content]'); | tippy('[data-tippy-content]'); | ||
tippy('[data-template]', { | |||
content(reference) { | |||
const id = reference.getAttribute('data-template'); | |||
const template = document.getElementById(id); | |||
return template.innerHTML; | |||
}, | |||
allowHTML: true, | |||
}); | |||
}); | }); | ||
}); | }); | ||