User:Loki Laufeyjarson/common.js: Difference between revisions
Jump to navigation
Jump to search
Created page with "(function () { function resolveUrl($el) { var u = $el.attr('data-audio-url'); if (u) return u; var f = $el.attr('data-audio-file'); if (!f || /\{\{/.test(f)) return null; // don’t play if a template param didn’t expand return mw.util.getUrl('Special:FilePath/' + f); } var cache = {}; mw.hook('wikipage.content').add(function ($c) { $c.on('click', '.click-audio', function (e) { e.preventDefault(); var u = resolveUrl($(this));..." |
Blanked the page Tag: Blanking |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||