MediaWiki:Gadget-dark-mode-toggle.js: Difference between revisions

Content deleted Content added
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();
});
 
// Work around lack of icon in stickyVector header2022
if (mw.config.get('skin') === 'vector-2022') {
$('#pt-darkmode-sticky-header' + portletId + ' span:only-child')
.before($('<span>').addClass('mw-ui-icon mw-ui-icon-vector-gadget-pt-darkmode'));
}
}