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

Function makeHeader

scripts/table_addSortTable.js:42–53  ·  view source on GitHub ↗
(tableNo, nCols)

Source from the content-addressed store, hash-verified

40 }
41
42 function makeHeader(tableNo, nCols) {
43 var header, headerCell, i;
44 header = document.createElement("tr");
45 for (i = 0; i < nCols; ++i) {
46 headerCell = document.createElement("td");
47 headerCell.appendChild(makeHeaderLink(tableNo, i, 1));
48 headerCell.appendChild(document.createTextNode("/"));
49 headerCell.appendChild(makeHeaderLink(tableNo, i, -1));
50 header.appendChild(headerCell);
51 }
52 return header;
53 }
54 g_tables = toArray(document.getElementsByTagName("table"));
55 if (!g_tables.length) alert("This page doesn't contain any tables.");
56 (function () {

Callers 1

Calls 1

makeHeaderLinkFunction · 0.85

Tested by

no test coverage detected