MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 2:
 
// Extra functionality for RAM/ROM maps
 
// Sort table by the first column
function trySort() {
var rerun = false;
Line 25 ⟶ 27:
setTimeout(trySort, 10);
 
// Add the ending address to the length column
$(function() {
var tables = document.getElementsByClassName("ram_rom_map");
for (var i = 0; i < tables.length; i++) {
var table = tables[i];
// Sort table by the first column
table.getElementsByTagName("th")[0].click();
// Add the ending address to the length column
var rows = table.getElementsByTagName("tbody")[0].children;
for (var j = 0; j < rows.length; j++) {