User:Zaxn1234/common.js

// Basically just this script https://en.wikipedia.org/wiki/User:Jdlrobson/vector-max-width-toggle.js //  With a click added to the $switcher object to auto-widen the page onload

$(function{   var lastValue;    try {        lastValue = localStorage.getItem('max-width-on') || '0';    } catch (e) {        lastValue = '0';    }

if (lastValue === '1') { $(document.body).toggleClass('skin-vector-max-width'); }

var originalMaxWidth = $('.mw-content-container').css('max-width')

var $switcher = $(' ') .on('click', function {           $(document.body).toggleClass('skin-vector-max-width');            localStorage.setItem('max-width-on', lastValue === '0' ? '1' : '0');           var currentMaxWidth = $('.mw-content-container').css('max-width')            $('.mw-content-container').css('max-width', currentMaxWidth === 'none' ? originalMaxWidth : 'none')       } ).prependTo('#content');

$('#content').css('position', 'relative'); $switcher.click;

// no click mode $('.vector-menu-checkbox').on('mouseover', function ( ev ) {

$('.vector-menu-checkbox').prop('checked', false); ev.target.checked = true; });

$('.vector-menu:not(.vector-menu-dropdown)').on('mouseover', function {        $('.vector-menu-checkbox').prop('checked', false);    }); });