MediaWiki:Mobile.js

// extension req //v2.0, 2017, user:fngplg. //set active tab: https://jojowiki.com/page#activeTab (function ($){   var nstarget = window.location.hash.replace('#', );    if (nstarget === ) return;    //convert wiki-utf 2 ansi    nstarget = nstarget.replace(/\./g, '%');    nstarget = decodeURIComponent(nstarget).replace(/_/g, ' ');    //console.log('trgt:'+nstarget);    $(function{ setTimeout(function {           var $nt2a = $('.tabberlive>.tabbernav>Li>a[title="' + nstarget + '"]');            $nt2a.click;            $nt2a.get(0).scrollIntoView;        }, 100);//settimeout });//doc.rdy   })(jQuery);

// Expand var state =1; $(function {  $('#collapse-global').html($('', {       'class': 'mw-ui-button',       text: 'Expand/Collapse All'   })).click(function { if(state ===0){ $('.mw-collapsible-toggle-expanded').click; state = 1; }      else { $('.mw-collapsible-toggle-collapsed').click; state = 0; }     } )});

// Refresh Button $(function {  $('#mw-refreshButton').html($('', {       'class': 'mw-ui-button',       text: 'Refresh'   })).click(function { location.reload; } )});

// English Cast Button $(function {  $('.mw-englishButton').html($('', {       'class': 'mw-ui-button',       text: 'English Cast'   })).click(function { window.location = (""+window.location).replace(/#[A-Za-z0-9_]*$/,'')+"#ENG"; } )});

// Japanese Cast Button $(function {  $('.mw-japaneseButton').html($('', {       'class': 'mw-ui-button',       text: 'Japanese Cast'   })).click(function { window.location = (""+window.location).replace(/#[A-Za-z0-9_]*$/,'')+"#JPN"; } )});

// Spanish Cast Button $(function {  $('.mw-spanishButton').html($('', {       'class': 'mw-ui-button',       text: 'Spanish Cast'   })).click(function { window.location = (""+window.location).replace(/#[A-Za-z0-9_]*$/,'')+"#SPA"; } )});

// French Cast Button $(function {  $('.mw-frenchButton').html($('', {       'class': 'mw-ui-button',       text: 'French Cast'   })).click(function { window.location = (""+window.location).replace(/#[A-Za-z0-9_]*$/,'')+"#FR"; } )});

// Italian Cast Button $(function {  $('.mw-italianButton').html($('', {       'class': 'mw-ui-button',       text: 'Italian Cast'   })).click(function { window.location = (""+window.location).replace(/#[A-Za-z0-9_]*$/,'')+"#ITA"; } )});

/* Tooltip */ $(".popup").click(function {    var $title = $(this).find(".title");    if (!$title.length) {        $(this).append(' ' + $(this).attr("title") + ' ');    } else {        $title.remove;    } });