Difference between revisions of "MediaWiki:Common.js"

From CJ-JT Wiki
Jump to navigation Jump to search
Line 2: Line 2:
  
 
$(window).on( 'load', function() {
 
$(window).on( 'load', function() {
     setTimeout('console.log("Loaded all records, adding option")', 3000);
+
     setTimeout(() => { console.log("Records fully loaded"); } 3000);
 
     var opt = new Option("all", "1500");
 
     var opt = new Option("all", "1500");
 
     $(opt).html("all");
 
     $(opt).html("all");

Revision as of 16:07, 24 April 2023

/* Any JavaScript here will be loaded for all users on every page load. */

$(window).on( 'load', function() {
    setTimeout(() => { console.log("Records fully loaded"); } 3000);
    var opt = new Option("all", "1500");
    $(opt).html("all");
    var t = $('label select[name="DataTables_Table_0_length"]').append(opt);
    console.log(t);
} );