User:Lexar/Main Page/Template:Benjas/Page.js
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
$('head').prepend('<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/>'); $('#mw-content-text').addClass('main-area'); var mobileMenu = $('#mobile-menu'), mobileMenuButton = $('#mobile-menu .mobile-menu-button'), pageMenu = $('#mobile-menu #page-menu'), accountMenu = $('#mobile-menu #account-menu'), accountList = $('#mobile-menu #account-list'), pageList = $('#mobile-menu #tab-menu'), menuSearch = $('#mobile-menu #p-search'), openSearch = $('#mobile-menu #search-expand'), mainMenu = $('#mobile-menu #mobile-ul-main'); $('#mw-head #p-personal > ul > li').each(function(){ var th = $(this); accountList.append('<li><span>' + th.html() + '</span></li>'); }); $('#left-navigation ul li').each(function(){ var th = $(this); pageList.append('<li'+(th.hasClass('selected')?' class="selected"':'')+'>'+th.html()+'</li>'); }); $($('#right-navigation #p-cactions .menu ul li').get().reverse()).each(function(){ var th = $(this); pageList.append('<li class="f-right'+(th.hasClass('selected')?' selected':'')+'">'+th.html()+'</li>'); }); $($('#right-navigation #p-views ul li').get().reverse()).each(function(){ var th = $(this); pageList.append('<li class="f-right'+(th.hasClass('selected')?' selected':'')+'">'+th.html()+'</li>'); }); $('#right-navigation #p-search #searchform').clone().appendTo(menuSearch); $('#mw-panel .portal:not(#p-Languages)').each(function(){ var th = $(this), listBuilder = ''; th.find('div ul li').each(function(){ var thi = $(this); listBuilder += '<li>'+thi.html()+'</li>'; }); mainMenu.append('<li>\ <h3><span>'+th.children('h3').text()+' <img src="/w/images/d/d9/User_Lexar_black-arrow.png" /></span></h3>\ <ul>\ '+listBuilder+'\ <li class="clearing"></li>\ </ul>\ <div class="clearing"></div>\ </li>'); });