Common.js: Difference between revisions
An Avatar.Global Resource
No edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
var $headline = $content.find("h1, h2").first(); | var $headline = $content.find("h1, h2").first(); | ||
if ($headline.length) { | if ($headline.length) { | ||
$("<div class='custom-message'>{{ | $("<div class='custom-message'>{{navmenu}}</div>").insertBefore($headline); | ||
} | } | ||
}); | }); | ||
Revision as of 15:09, 16 March 2025
/* Any JavaScript here will be loaded for all users on every page load. */
mw.hook('wikipage.content').add(function($content) {
var $headline = $content.find("h1, h2").first();
if ($headline.length) {
$("<div class='custom-message'>{{navmenu}}</div>").insertBefore($headline);
}
});
