Bureaucrats, ninja, Administrators
67,565
edits
m (I'm back) |
(Changes for browsers without Jscript available (and for old IEs)...) |
||
Line 246: | Line 246: | ||
function doExpandText(textIndex) | function doExpandText(textIndex) | ||
{ | { | ||
var | var Button=document.getElementById("pcsx2_collapsibleButton"+textIndex); | ||
if (! | if (!Button) return false; | ||
var TextFull=document.getElementById("pcsx2_collapsibleTextFull"+textIndex); | var TextFull=document.getElementById("pcsx2_collapsibleTextFull"+textIndex); | ||
if (!TextFull) return false; | if (!TextFull) return false; | ||
Button.style.display="none"; | |||
TextFull.style.display=" | TextFull.style.display=""; | ||
} | } | ||
Line 268: | Line 268: | ||
//creating href | //creating href | ||
var Button=document.createElement("span"); | var Button=document.createElement("span"); | ||
var ButtonLink=document.createElement("a"); | var ButtonLink=document.createElement("a"); | ||
var ButtonText=document.createTextNode("..."); | var ButtonText=document.createTextNode("..."); | ||
//Button.style.backgroundColor="#90E0FF"; | //Button.style.backgroundColor="#90E0FF"; | ||
Button.style.fontStyle="italic"; | //Button.style.fontStyle="italic"; | ||
Button.style.fontWeight="bold"; | Button.style.fontWeight="bold"; | ||
Button.style.fontSize="smaller"; | Button.style.fontSize="smaller"; | ||
Button.setAttribute("id","pcsx2_collapsibleButton"+textIndex); | |||
ButtonLink.setAttribute("href","javascript:doExpandText("+textIndex+");"); | ButtonLink.setAttribute("href","javascript:doExpandText("+textIndex+");"); | ||
ButtonLink.setAttribute("title","Expand this text..."); | ButtonLink.setAttribute("title","Expand this text..."); | ||
ButtonLink.appendChild(ButtonText); | ButtonLink.appendChild(ButtonText); | ||
Button.appendChild(document.createTextNode("(")); | Button.appendChild(document.createTextNode(" (")); | ||
Button.appendChild(ButtonLink); | Button.appendChild(ButtonLink); | ||
Button.appendChild(document.createTextNode(")")); | Button.appendChild(document.createTextNode(")")); | ||
TextPart.setAttribute("id","pcsx2_collapsibleTextPart"+textIndex); | //TextPart.setAttribute("id","pcsx2_collapsibleTextPart"+textIndex); | ||
TextFull.setAttribute("id","pcsx2_collapsibleTextFull"+textIndex); | TextFull.setAttribute("id","pcsx2_collapsibleTextFull"+textIndex); | ||
TextFull.style.display="none"; | TextFull.style.display="none"; | ||
TextPart.appendChild(Button); | TextPart.appendChild(Button); | ||
textIndex++; | textIndex++; |