MediaWiki:Common.js: Difference between revisions

attempting to use new ES6 await feature
(alert() -> console.log())
(attempting to use new ES6 await feature)
Line 518: Line 518:
  */
  */


function sortSortableTables()
function wikiSleep(ms)
{
{
    return new Promise(resolve => setTimeout(resolve, ms));
}
async function sortSortableTables()
{
    await sleep(2000);
     console.log("Sorting the autosort tables.");
     console.log("Sorting the autosort tables.");
     // Iterate over all <div> elements
     // Iterate over all <div> elements