5,960
edits
No edit summary |
No edit summary |
||
Line 142: | Line 142: | ||
button.innerHTML = "Collapse"; | button.innerHTML = "Collapse"; | ||
} | } | ||
} | |||
/* ======================================= Tractatus Logico-Philosophicus (static tree-like view) ======================================= */ | |||
//change link target to tree-structured version | |||
var numbers = document.querySelectorAll(".static-tree-like-tlp-container a"); | |||
console.log("lunghezza: "+numbers.length); | |||
var i; | |||
for (i = 0; i < numbers.length; i++) { | |||
var target = numbers[i].href; | |||
target = target.replace("Logisch-philosophische_Abhandlung", "Logisch-philosophische_Abhandlung_(Darstellung_in_Baumstruktur)"); | |||
numbers[i].href = target; | |||
} | |||
//add arrows linking to expanded child proposition | |||
var numbersOfRemarksWithChildren = document.querySelectorAll('.tlp-pr-with-children .tlp-aside-par'); | |||
for (i = 0; i < numbersOfRemarksWithChildren.length; i++) { | |||
var oldNumberString = numbersOfRemarksWithChildren[i].innerHTML; | |||
var numberStringId = numbersOfRemarksWithChildren[i].id; | |||
var newNumberString = oldNumberString + ' <a href="#separator-' + numberStringId + '">→</a>'; | |||
numbersOfRemarksWithChildren[i].innerHTML = newNumberString; | |||
} | } | ||