'wdcli backup': Rework backup process
This commit reworks the backup process to dynamically find the list of components.
This commit is contained in:
parent
55bee7422d
commit
5cd5ae9be2
32 changed files with 361 additions and 279 deletions
24
internal/component/control/html/static/autolink.js
Normal file
24
internal/component/control/html/static/autolink.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/** adding links to each item, see http://blog.parkermoore.de/2014/08/01/header-anchor-links-in-vanilla-javascript-for-github-pages-and-jekyll/ */
|
||||
var anchorForId = function (id) {
|
||||
var anchor = document.createElement("a");
|
||||
anchor.className = "header-link";
|
||||
anchor.href = "#" + id;
|
||||
anchor.innerHTML = "#";
|
||||
return anchor;
|
||||
};
|
||||
|
||||
var linkifyAnchors = function (level) {
|
||||
var headers = document.getElementsByTagName("h" + level);
|
||||
for (var h = 0; h < headers.length; h++) {
|
||||
var header = headers[h];
|
||||
|
||||
if (typeof header.id !== "undefined" && header.id !== "") {
|
||||
header.appendChild(anchorForId(header.id));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
for (var level = 1; level <= 6; level++) {
|
||||
linkifyAnchors(level);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue