MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
 
function runUntilSuccess(f) {
(function run() {
if (rerun!f()) {
setTimeout(trySortrun, 10);
}
})();
 
// Extra functionality for RAM/ROM maps
 
// Sort table by the first column
runUntilSuccess(function trySort() {
var rerun = false;
var tables = document.getElementsByClassName("ram_rom_map");
for (var i = 0; i < tables.length; i++) {
Line 17 ⟶ 23:
}
} else {
rerunreturn = truefalse;
}
}
return true;
});
if (rerun) {
setTimeout(trySort, 10);
}
setTimeout(trySort, 10);
 
// Add the ending address to the length column