Common.js: Difference between revisions
Project Rebearth wiki
Replaced content with "(function () { if (mw.config.get('wgPageName') === 'Project:Changelog_Editor') { mw.loader.load('/w/index.php?title=MediaWiki:ChangelogEditor.css&action=raw&ctype=text/css', 'text/css'); mw.loader.load('/w/index.php?title=MediaWiki:ChangelogEditor.js&action=raw&ctype=text/javascript'); } })();" Tag: Replaced |
Add namespace-aware tagline swap (italics + Lore icon) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
(function () { | (function () { | ||
if (mw.config.get('wgPageName') === ' | if (mw.config.get('wgPageName') === 'Project_Rebearth:Changelog_editor') { | ||
mw.loader.load(' | mw.loader.load('/index.php?title=MediaWiki:ChangelogEditor.css&action=raw&ctype=text/css', 'text/css'); | ||
mw.loader.load(' | mw.loader.load('/index.php?title=MediaWiki:ChangelogEditor.js&action=raw&ctype=text/javascript'); | ||
} | } | ||
})(); | })(); | ||
// Tagline: italic "Project Rebearth" on non-Lore pages; icon + italic on Lore namespace | |||
$(function () { | |||
var $tag = $('#tagline'); | |||
if (!$tag.length) return; | |||
if (mw.config.get('wgCanonicalNamespace') === 'Lore') { | |||
$tag.html( | |||
'<a href="/index.php/Lore" title="Lore">' + | |||
'<img src="/index.php/Special:FilePath/LoreIcon.png" ' + | |||
'class="iconimg" alt="Lore icon" ' + | |||
'style="height:15px;vertical-align:-3px;">' + | |||
'</a> <i>Project Rebearth</i> lore' | |||
); | |||
} else { | |||
$tag.html('<i>Project Rebearth</i> wiki'); | |||
} | |||
}); | |||
Latest revision as of 09:58, 19 April 2026
(function () {
if (mw.config.get('wgPageName') === 'Project_Rebearth:Changelog_editor') {
mw.loader.load('/index.php?title=MediaWiki:ChangelogEditor.css&action=raw&ctype=text/css', 'text/css');
mw.loader.load('/index.php?title=MediaWiki:ChangelogEditor.js&action=raw&ctype=text/javascript');
}
})();
// Tagline: italic "Project Rebearth" on non-Lore pages; icon + italic on Lore namespace
$(function () {
var $tag = $('#tagline');
if (!$tag.length) return;
if (mw.config.get('wgCanonicalNamespace') === 'Lore') {
$tag.html(
'<a href="/index.php/Lore" title="Lore">' +
'<img src="/index.php/Special:FilePath/LoreIcon.png" ' +
'class="iconimg" alt="Lore icon" ' +
'style="height:15px;vertical-align:-3px;">' +
'</a> <i>Project Rebearth</i> lore'
);
} else {
$tag.html('<i>Project Rebearth</i> wiki');
}
});