Zeile 140: |
Zeile 140: |
| onloadFuncts[onloadFuncts.length] = createNavigationBarToggleButton; | | onloadFuncts[onloadFuncts.length] = createNavigationBarToggleButton; |
| | | |
− | addOnloadHook(function(){ if ($(".spoiler").size()>0) { var w = document.getElementById("ca-watch"); if (!w) w = document.getElementById("ca-unwatch"); var node = addPortletLink("p-views", "#", "Spoiler aufdecken", "ca-spoiler", "Vorhandene Spoiler auf- und zudecken", "s", w); if (node) { node.onclick = function() { $(".spoiler").css("display",function(i,d){return d==="inline"?"none":"inline";}); $("#ca-spoiler").toggleClass("selected"); return false; }; var img = document.createElement("img"); img.width = "24"; img.height = "24"; img.alt = "Spoiler aufdecken"; img.src = "http://upload.wikimedia.org/wikipedia/commons/thumb/1/17/System-search.svg/24px-System-search.svg.png"; img.style.position = "relative"; img.style.top = "-5px"; node.firstChild.firstChild.replaceChild(img, node.firstChild.firstChild.firstChild); } }}); | + | addOnloadHook(function() |
| + | { |
| + | if ($(".spoiler").size()>0) |
| + | { |
| + | var w = document.getElementById("ca-watch"); |
| + | if (!w) w = document.getElementById("ca-unwatch"); |
| + | var node = addPortletLink("p-views", "#", "Spoiler aufdecken", "ca-spoiler", "Vorhandene Spoiler auf- und zudecken", "s", w); |
| + | if (node) |
| + | { |
| + | node.onclick = function() |
| + | { |
| + | $(".spoiler").css("display",function(i,d){return d==="inline"?"none":"inline";}); |
| + | $("#ca-spoiler").toggleClass("selected"); |
| + | return false; |
| + | }; |
| + | var img = document.createElement("img"); |
| + | img.width = "24"; |
| + | img.height = "24"; |
| + | img.alt = "Spoiler aufdecken"; |
| + | img.src = "http://upload.wikimedia.org/wikipedia/commons/thumb/1/17/System-search.svg/24px-System-search.svg.png"; |
| + | img.style.position = "relative"; |
| + | img.style.top = "-5px"; |
| + | node.firstChild.firstChild.replaceChild(img, node.firstChild.firstChild.firstChild); |
| + | } |
| + | } |
| + | }); |
| + | |
| | | |
| | | |
| // END Dynamic Navigation Bars | | // END Dynamic Navigation Bars |