Changes
Jump to navigation
Jump to search
← Older edit
MediaWiki:Common.js
(view source)
Revision as of 20:30, 10 October 2020
560 bytes removed
,
20:30, 10 October 2020
no edit summary
Line 1:
Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
−
function isSortedTablePage() {
−
return ( wgPageName == "Page_To_Sort" || wgPageName == "Other_Page_To_Sort" );
−
}
−
−
jQuery( document ).ready( function( $ ) {
−
// wrapped in "mw.loader.using" so this doesn't execute until Tablesorter has loaded
−
mw.loader.using( 'jquery.tablesorter', function() {
−
if( isSortedTablePage() ) $('table.sortable').tablesorter( {sortList: [ { 0: 'asc'} ]} )
−
// or look for tables with an ID attribute of "sortMe" on any page
−
// $( '#sortMe' ).tablesorter( {sortList: [ { 0: 'asc'} ]} )
−
} );
−
} );
Tim
Bureaucrats
,
Interface administrators
,
Administrators
615
edits
Navigation menu
Personal tools
Create account
Log in
Namespaces
Message
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version