MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / countCols

Function countCols

scripts/table_addSortTable.js:26–33  ·  view source on GitHub ↗
(tab)

Source from the content-addressed store, hash-verified

24 }
25
26 function countCols(tab) {
27 var nCols, i;
28 nCols = 0;
29 for (i = 0; i < tab.rows.length; ++i)
30 if (tab.rows[i].cells.length > nCols)
31 nCols = tab.rows[i].cells.length;
32 return nCols;
33 }
34
35 function makeHeaderLink(tableNo, colNo, ord) {
36 let button = document.createElement("button");

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected