MediaWiki:Gadget-dark-mode-toggle.js: Difference between revisions
Content deleted Content added
code update requested on MediaWiki_talk:Gadget-dark-mode-toggle.js |
sync requested update from User:Nardog/dark-mode-toggle.js |
||
Line 35:
function vectorStickyCallback() {
makePortletLink('p-personal-sticky-header', 'pt-darkmode-sticky-header', '#pt-watchlist-sticky-header');
// Work around lack of icon in sticky header▼
$('#pt-darkmode-sticky-header span:only-child')▼
.before($('<span>').addClass('mw-ui-icon mw-ui-icon-vector-gadget-pt-darkmode'));▼
mw.hook('vector.page_title_scroll').remove(vectorStickyCallback);
}
Line 64 ⟶ 59:
toggleMode();
});
if (mw.config.get('skin') === 'vector-2022') {
▲ .before($('<span>').addClass('mw-ui-icon mw-ui-icon-vector-gadget-pt-darkmode'));
}
}
|