Common.js: Difference between revisions
An Avatar.Global Resource
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
mw.hook('wikipage.content').add(function($content) { | |||
var $headline = $content.find("h1, h2").first(); | |||
if ($headline.length) { | |||
$("<div class='custom-message'>{{HeaderMessage}}</div>").insertBefore($headline); | |||
var | |||
if ( | |||
} | } | ||
}); | }); | ||
Revision as of 13:45, 16 March 2025
mw.hook('wikipage.content').add(function($content) {
var $headline = $content.find("h1, h2").first();
if ($headline.length) {
$("<div class='custom-message'>{{HeaderMessage}}</div>").insertBefore($headline);
}
});
