MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
Changes for browsers without Jscript available (and for old IEs)...
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 TextPart=document.getElementById("pcsx2_collapsibleTextPart"+textIndex);
     var Button=document.getElementById("pcsx2_collapsibleButton"+textIndex);
     if (!TextPart) return false;
     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;
     TextPart.style.display="none";
     Button.style.display="none";
     TextFull.style.display="";//"initial";
     TextFull.style.display="";
}
}


Line 268: Line 268:
         //creating href
         //creating href
         var Button=document.createElement("span");
         var Button=document.createElement("span");
        var aText=document.createTextNode(" ");
         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(aText);
         TextPart.appendChild(Button);
         TextPart.appendChild(Button);
         textIndex++;
         textIndex++;
67,564

edits

Navigation menu