MediaWiki:Citizen.js
MediaWiki interface page
More actions
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
$(function () {
var headerEnd = document.querySelector('.citizen-header__end');
if (!headerEnd) {
return;
}
var buttonDiv = document.createElement('div');
buttonDiv.className = 'citizen-header__item';
var link = document.createElement('a');
link.href = '/index.php/Special:CreatePage';
link.className = 'citizen-header__button';
link.title = 'Create a new page';
link.innerHTML = '<span class="citizen-ui-icon" style="display:flex;align-items:center;justify-content:center;font-size:20px;color:oklch(80% 0.05 262.29);"><i class="fa-solid fa-file-circle-plus"></i></span>';
buttonDiv.appendChild(link);
headerEnd.prepend(buttonDiv);
});