MediaWiki:Gadget-skinTogglesNew.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with "→‎* * Handles the full-width toggle, dark mode toggle, and other appearance-related * toggles on the page. * * @author Gaz Lloyd * @author Jayden *: ;(function($, mw, rs){ var DARK_COOKIE = 'darkmode', THEME_COOKIE = 'theme', FLOORNUMBER_LS = 'floornumber_display', theme = ($.cookie('theme') !== null) ? $.cookie('theme') : (($.cookie(DARK_COOKIE) === 'true') ? 'dark' : 'light'), fixedWidthEnabled = $.cookie('readermode') === 'true', currentFloornumb...")
 
No edit summary
Tag: Reverted
Line 114:
*/
createFixedWidthPortletLink: function() {
fixedWidthPortletLink = mw.mw.util.addPortletLink('p-personal', '', '', 'pt-fixed-width', 'Toggle fixed-width mode', null, $('#pt-userpage, #pt-anonuserpage'));
$(fixedWidthPortletLink).find('a').addClass('oo-ui-icon-advanced').click(function(e) {
e.preventDefault();
Line 125:
*/
createThemePortletLink: function() {
themePortletLink = mw.mw.util.addPortletLink('p-personal', '', '', 'pt-theme-toggles', 'Change theme', null, $('#pt-userpage, #pt-anonuserpage'));
$(themePortletLink).find('a').addClass('oo-ui-icon-advanced').click(function(e) {
e.preventDefault();
Line 307:
}
 
mw.loader.using(['ext.gadget.rsw-mw.util'], function () {
$(self.init);
})

Navigation menu