MLavazza

Joined 3 December 2020
no edit summary
No edit summary
No edit summary
Line 45: Line 45:
<script>
<script>
//change link target to tree-structured version
//change link target to tree-structured version
var numbers = document.getElementsByTagName("a");
var numbers = document.querySelectorAll(".static-tree-like-tlp-container a");
console.log("lunghezza: "+numbers.length);
console.log("lunghezza: "+numbers.length);
var i;
var i;
for (i = 0; i < numbers.length; i++) {
for (i = 0; i < numbers.length; i++) {
  //console.log(numbers[i]);
   var target = numbers[i].href;
   var target = numbers[i].href;
  //console.log(target);
   target = target.replace("Logisch-philosophische_Abhandlung", "Logisch-philosophische_Abhandlung_(Darstellung_in_Baumstruktur)");
   target = target.replace("Logisch-philosophische_Abhandlung", "Logisch-philosophische_Abhandlung_(Darstellung_in_Baumstruktur)");
   numbers[i].href = target;
   numbers[i].href = target;
Line 60: Line 58:
for (i = 0; i < numbersOfRemarksWithChildren.length; i++) {
for (i = 0; i < numbersOfRemarksWithChildren.length; i++) {
     var oldNumberString = numbersOfRemarksWithChildren[i].innerHTML;
     var oldNumberString = numbersOfRemarksWithChildren[i].innerHTML;
    console.log("oldNumberString: " + oldNumberString);
     var numberStringId = numbersOfRemarksWithChildren[i].id;
     var numberStringId = numbersOfRemarksWithChildren[i].id;
    console.log("id: " + numberStringId);
     var newNumberString = oldNumberString + ' <a href="#separator-' + numberStringId + '">→</a>';
     var newNumberString = oldNumberString + ' <a href="#separator-' + numberStringId + '">→</a>';
    console.log("newNumberString: " + newNumberString);
     numbersOfRemarksWithChildren[i].innerHTML = newNumberString;
     numbersOfRemarksWithChildren[i].innerHTML = newNumberString;
}
}
</script>
</script>
</html>
</html>