MediaWiki:Gadget-OnlineAdmins.js: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary |
←Replaced content with '{{subst:iusc|User:P999/Toggle VF.js}}.' |
||
Line 1: | Line 1: | ||
/* Toggle VF |
/* User:P999/Toggle VF.js */ |
||
importScript( 'User:P999/Toggle VF.js' ); // Backlink: [[User:P999/Toggle VF.js]]. |
|||
// 05 Apr 16 0108 |
|||
function dotogg() |
|||
{ |
|||
$( 'head' ).append( '<style type="text/css" media="screen">' + ' ul { list-style: none; }' + '</style>' ); |
|||
$( 'head' ).append( '<style type="text/css" media="print">' + ' ul { list-style: none; }' + '</style>' ); |
|||
$( ".mw-headline[id='References'] " ).toggle(); |
|||
$( ".reference" ).toggle(); |
|||
$( "ol.references" ).toggle(); |
|||
$( ".toc" ).toggle(); |
|||
$( ".template" ).toggle(); |
|||
$( ".navbox" ).toggle(); |
|||
$( ".navbar" ).toggle(); |
|||
$( ".thumb" ).toggle(); |
|||
$( ".wikitable" ).toggle(); |
|||
$( ".toccolours" ).toggle(); |
|||
$( ".hatnote" ).toggle(); |
|||
$( ".hlist" ).toggle(); |
|||
$( ".mw-headline[id='External_Links'] " ).toggle(); |
|||
$( ".external" ).toggle(); |
|||
// $( ".external.text" ).show(); // showing only Ext Links |
|||
// |
|||
$( ".ambox" ).toggle(); |
|||
$( ".mbox" ).toggle(); |
|||
$( ".ombox" ).toggle(); |
|||
$( ".dmbox" ).toggle(); |
|||
$( ".fmbox" ).toggle(); |
|||
$( ".messagebox" ).toggle(); |
|||
$( ".vertical-navbox" ).toggle(); |
|||
$( ".infobox" ).toggle(); |
|||
$( ".infobox.sisterproject" ).toggle(); |
|||
$( ".infobox.subdivision" ).toggle(); |
|||
$( ".dablink" ).toggle(); |
|||
$( ".metadata" ).toggle(); |
|||
$( ".editlink" ).toggle(); |
|||
$( ".navbar" ).toggle(); |
|||
// |
|||
$( "#siteSub" ).toggle(); |
|||
$( ".printfooter" ).toggle(); |
|||
$( "#catlinks, .catlinks" ).toggle(); |
|||
$( "#footer" ).toggle(); |
|||
$( "#header" ).toggle(); |
|||
$( ".image" ).toggle(); |
|||
$( ".metadata" ).toggle(); |
|||
$( ".protected" ).toggle(); |
|||
$( ".boilerplate" ).toggle(); |
|||
$( ".mw-editsection-bracket" ).toggle(); |
|||
$( ".mw-editsection" ).toggle(); |
|||
} |
|||
var codeload; |
|||
if (codeload!=9999) { |
|||
dotogg(); |
|||
firstHeading.style.textAlign = 'center'; |
|||
$( ".Template-Fact" ).hide(); |
|||
$("#coll-create_a_book").hide(); |
|||
$("#coll-download-as-rdf2latex").hide(); |
|||
// $("#t-print").replaceWith('<a href="/w/index.php?title=Nunatak&printable=yes" title="Printable version of this page [p]" accesskey="p">Printable VF</a></li>'); |
|||
codeload=9999; } |
|||
var toggflag=0; |
|||
mw.loader.using( 'mediawiki.util', function () { |
|||
$( document ).ready( function() { |
|||
var ToggVF = mw.util.addPortletLink( "p-tb", "#", "Toggle VF", "t-Toggle VF","Convert to Voice-Friendly format",'4'); |
|||
$( ToggVF ).click( function() { |
|||
toggflag=toggflag+1; |
|||
dotogg(); |
|||
if (toggflag==1) {firstHeading.style.textAlign = 'left'; |
|||
$( ".Template-Fact" ).show(); } |
|||
if (toggflag==2) {firstHeading.style.textAlign = 'center'; |
|||
$( ".Template-Fact" ).hide(); |
|||
toggflag=0 ; } |
|||
} ); |
|||
} ); |
|||
} ); |