function dashClock(elementID, nodes) {
    let table = document.createElement("table");
    
    table.className = "dashClock";

    let title_row = document.createElement("tr");
    let clock_row = document.createElement("tr");

    title_row.className = "title_row";
    clock_row.className = "clock_row";

    nodes.forEach((x) => {
        x.time = timeFromZone(x.timezone);

        let title_cell = document.createElement("td");
        let clock_cell = document.createElement("td");

        title_cell.innerHTML = x.title;
        title_cell.className = "title_cell"
        clock_cell.innerHTML = x.time;
        clock_cell.className = "clock_cell";
        clock_cell.dataset.timezone = x.timezone;

        title_row.appendChild(title_cell);
        clock_row.appendChild(clock_cell);
    });

    table.appendChild(title_row);
    table.appendChild(clock_row);

    let anchor = document.getElementById(elementID);

    anchor.parentNode.replaceChild(table, anchor);

    setInterval(() => updateClocks(), 1000);
}
// replaces an existing element(elementID) with a table. nodes is an array containing timezone data formatted with the dcNode function
replaces an existing element(elementID) with a table. nodes is an array containing timezone data formatted with the dcNode function
replaces an existing element ( elementID ) with a table . nodes is an array containing timezone data formatted with the dcNode function
function dashClock(elementID, nodes) {
    let table = document.createElement("table");
    table.className = "dashClock";
    let title_row = document.createElement("tr");
    let clock_row = document.createElement("tr");
    title_row.className = "title_row";
    clock_row.className = "clock_row";
    nodes.forEach((x) => {
        x.time = timeFromZone(x.timezone);
        let title_cell = document.createElement("td");
        let clock_cell = document.createElement("td");
        title_cell.innerHTML = x.title;
        title_cell.className = "title_cell"
        clock_cell.innerHTML = x.time;
        clock_cell.className = "clock_cell";
        clock_cell.dataset.timezone = x.timezone;
        title_row.appendChild(title_cell);
        clock_row.appendChild(clock_cell);
    });
    table.appendChild(title_row);
    table.appendChild(clock_row);
    let anchor = document.getElementById(elementID);
    anchor.parentNode.replaceChild(table, anchor);
    setInterval(() => updateClocks(), 1000);
}
function dashClock ( elementID , nodes ) { let table = document . createElement ( "table" ) ; table . className = "dashClock" ; let title_row = document . createElement ( "tr" ) ; let clock_row = document . createElement ( "tr" ) ; title_row . className = "title_row" ; clock_row . className = "clock_row" ; nodes . forEach ( ( x ) => { x . time = timeFromZone ( x . timezone ) ; let title_cell = document . createElement ( "td" ) ; let clock_cell = document . createElement ( "td" ) ; title_cell . innerHTML = x . title ; title_cell . className = "title_cell" clock_cell . innerHTML = x . time ; clock_cell . className = "clock_cell" ; clock_cell . dataset . timezone = x . timezone ; title_row . appendChild ( title_cell ) ; clock_row . appendChild ( clock_cell ) ; } ) ; table . appendChild ( title_row ) ; table . appendChild ( clock_row ) ; let anchor = document . getElementById ( elementID ) ; anchor . parentNode . replaceChild ( table , anchor ) ; setInterval ( ( ) => updateClocks ( ) , 1000 ) ; }
replaces an existing element(elementID) with a table.
replaces an existing element ( elementID ) with a table .