MediaWiki:Citizen.js: Difference between revisions
MediaWiki interface page
More actions
No edit summary |
Fix button alignment (insert into citizen-header__end) and remove FA JS injection (moved to CSS) (via update-page on MediaWiki MCP Server) |
||
| Line 1: | Line 1: | ||
$(function() { | $(function () { | ||
var headerEnd = document.querySelector('.citizen-header__end'); | |||
if (!headerEnd) { | |||
return; | |||
var | |||
if ( | |||
} | } | ||
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); | |||
}); | }); | ||
Revision as of 10:55, 25 June 2026
$(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);
});