|
|
Line 274: |
Line 274: |
| } | | } |
| } | | } |
|
| | |
| // Add a new section link to the bottom of discussion pages
| |
| function addsectionbottom() {
| |
| if (!wgIsArticle) return;
| |
| if ((document.URL.indexOf('?')>=0) && (document.URL.indexOf('action=delete')>=0)) return;
| |
| var caplus;
| |
| if (!(caplus = document.getElementById("ca-addsection"))) return;
| |
| var addsection = document.createElement("span");
| |
| addsection.innerHTML = "<h3> <a " + "href=\"" + caplus.childNodes[0].getAttribute("href") +
| |
| "\" title=\"" + caplus.childNodes[0].getAttribute("title") +
| |
| "\" accesskey=\"" + caplus.childNodes[0].getAttribute("accesskey") +
| |
| "\" >" + (skin == "vector" ? "<span> Add topic</span>" : "<span> Add section</span>" ) + "</a> </h3>"
| |
| addsection.className = "noprint";
| |
| addsection.id = "addsectionbottom";
| |
| var content;
| |
| if (!(content = document.getElementById("bodyContent"))) return;
| |
| var catlinks = document.getElementById("catlinks");
| |
| if (catlinks == null)
| |
| {
| |
| content.appendChild(addsection);
| |
| } else {
| |
| content.insertBefore(addsection, catlinks);
| |
| }
| |
| }
| |
| addOnloadHook(addsectionbottom);
| |
| | | |
| // Highlight recent changes | | // Highlight recent changes |