Sha256: 3926fa99109d9225e6b31e486b7f59af5bbe5f5850c35dc2cdedd8a445e3a266
Contents?: true
Size: 1.21 KB
Versions: 1
Compression:
Stored size: 1.21 KB
Contents
// By: h01000110 (hi) // github.com/h01000110 function numbers () { var fields = document.getElementsByTagName("code"); for (field in fields) { var num = 0; var select = fields[field].innerText; var select_f = select.split(/\n/); var tab = document.createElement("table"); // IF YOU USE MARKDOWN AND YOU HAVE BEEN GETTING ONE ADDITIONAL LINE IN YOUR TAG CODE // UNCOMMENT THE SECTION BELOW /* MARKDOWN SECTION /**/ select_f.splice(-1, 1); /* END OF SECTION*/ fields[field].innerHTML = ""; fields[field].appendChild(tab); for (line in select_f) { var row = document.createElement("tr"); var col = document.createElement("th"); var colc = document.createElement("th"); col.innerText = num + 1; colc.innerText = select_f[line]; row.appendChild(col); row.appendChild(colc); tab.appendChild(row); num = num + 1; // STYLE SECTION - If you want, change it below col.style.textAlign = "right"; colc.style.textAlign = "left"; tab.style.border = "0"; col.style.border = "0"; colc.style.border = "0"; col.style.padding = "3px"; colc.style.padding = "3px"; col.style.borderRight = "2px solid #777777"; // END OF SECTION } } } window.onload = numbers();
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jekyll-theme-windows95-0.2.0 | assets/js/002.js |