[Bf-docboard-svn] bf-manual: [8867] trunk/blender_docs/resources/templates/404.html: Cleanup: Remove unused html

Aaron Carlisle noreply at blender.org
Tue Jan 25 19:04:39 CET 2022


Revision: 8867
          https://developer.blender.org/rBM8867
Author:   Blendify
Date:     2022-01-25 19:04:38 +0100 (Tue, 25 Jan 2022)
Log Message:
-----------
Cleanup: Remove unused html

Modified Paths:
--------------
    trunk/blender_docs/resources/templates/404.html

Modified: trunk/blender_docs/resources/templates/404.html
===================================================================
--- trunk/blender_docs/resources/templates/404.html	2022-01-25 17:46:10 UTC (rev 8866)
+++ trunk/blender_docs/resources/templates/404.html	2022-01-25 18:04:38 UTC (rev 8867)
@@ -62,95 +62,3 @@
 window.onload=init();
 </script>
 {%- endblock %}
-
-<!-- TODO Assess how much of this we want to keep -->
-<!--
-<ul id="linklist"></ul>
- insertbtns();
- indexPages();
-}
-/*add buttons to insert page name and the hash into the search field*/
-function insertbtns() {
- var url = window.location.href;
- var linklist = document.getElementById("linklist");
- var pageName = url.match(/\/([\w\-_\.]+)\.html/);
- if(pageName !== null) {
-   pageName = pageName[1];
-   var resp = /[\-_\.]/g;
-   pageName = pageName.replace(resp, " ");
-
-   var newLi = document.createElement("li");
-   var newP = document.createElement("p");
-   newP.setAttribute("data-txt", pageName);
-   if(pageName.length > 12) {
-     pageName = pageName.substr(0, 10);
-     pageName += "...";
-   }
-   newP.setAttribute("title", "Insert the page name ("  + pageName + ") into the search field");
-   newP.innerHTML = "Insert" + ' "' + pageName + '"';
-   newLi.appendChild(newP);
-   linklist.appendChild(newLi);
-   newP.addEventListener("click", click_handler, true);
- }
- var hash = location.hash;
- if(hash !== "") {
-   hash = hash.substr(1, hash.length);
-   hash = hash.replace(resp, " ");
-   newLi = document.createElement("li");
-   newP = document.createElement("p");
-   newP.setAttribute("data-txt", hash);
-   newP.setAttribute("title", "Insert the hash (" + hash + ") into the search field");
-   if(hash.length > 12) {
-     hash = hash.substr(0, 10);
-     hash += "...";
-   }
-   newP.innerHTML = "Insert" + ' "' + hash + '"';
-   newLi.appendChild(newP);
-   linklist.appendChild(newLi);
-   newP.addEventListener("click", click_handler, true);
- }
-}
-function click_handler(e) {
- var text = e.target.getAttribute("data-txt");
- var field = document.getElementsByName("q")[0];
- if(field.value !== "" && field.value.substr(field.value.length - 1, field.value.length) !== " ") {field.value += " ";}
- field.value += text;
-}
-/*add links to index pages*/
-function indexPages() {
- var url = window.location.href;
- var hash = location.hash;
- if(hash !== "") {
-   url = url.replace(hash, "");
- }
- var url_re = /\/[\w\-_\.]*$/;
- var new_url = url.replace(url_re, "/index.html");
- var base_re = /^https\:\/\/docs.blender.org\/manual\//;
- if(base_re.test(new_url)) {
-   if(url !== new_url) { loadDoc(new_url, "ix", "Index", "Go to the Index page");}
- }
- url_re = /\/[\w\-_\.]*\/[\w\-_\.]*$/;
- new_url = url.replace(url_re, "/index.html");
- if(base_re.test(new_url)) {
-   loadDoc(new_url, "pix", "Parent Index", "Go to the Parent folders Index page");
- }
-}
-/*check if index links are not 404*/
-function loadDoc(requestUrl, id, text, title) {
- var xhttp = new XMLHttpRequest();
- xhttp.onreadystatechange = function() {
-   if (this.readyState == 4 && this.status == 200) {
-     var newLi = document.createElement("li");
-     var newA = document.createElement("a");
-     newA.setAttribute("href", requestUrl);
-     newA.setAttribute("id", id);
-     newA.setAttribute("title", title);
-     newA.innerHTML = text;
-     newLi.appendChild(newA);
-     document.getElementById("linklist").appendChild(newLi);
-   }
- };
- xhttp.open("GET", requestUrl, true);
- xhttp.send();
-}
--->



More information about the Bf-docboard-svn mailing list