minimize xanga modules (photo) |
minimize xanga modules (photo) |
![]()
Post
#1
|
|
Newbie ![]() Group: Member Posts: 2 Joined: Feb 2007 Member No: 505,833 ![]() |
ok, for those of you who like using codes on your xanga page you may know that there is some code to minimize your side modules. this particular code was written by easteregg, but he no longer works with code for xanga. with the release of the photo module (aka javascript module) the code also minimizes that. you can set the code to minimize or not minimize the first module that has your information in it (that is on the left). i was wondering if it was possible to edit the code so it would not minimize the photo (java) module.
here is the code to minimize the modules... to see what the script does and the photo module go here, QUOTE <script type="text/javascript">
// // ============================ // "Minimize your modules" // version 2.0, July, 2005 // ============================ // // ©2005 EasterEgg // // - 1.0 May 2005, intitial release. // - 2.0 July 2005, bug fix plus option to display the top module by default. // // Thanks goes to BrandonReese at Xanga for making a suggestion to improve the code. // // For use at Xanga only. This won't have any effect if you're using a Xanga skin. // This script is freeware, and is provided 'as is', without guarantees of any kind. // It has been tested on the Mac and Windows platform (IE, FireFox and Netscape, // doesn't work in Opera though). // // None of the comments in this script may be removed. I'd appreciate if you would // let me know if you want to make this script available to others on your own site. // // This script "minimizes" your left side modules, and turns the headers into links. // Upon clicking one of those links, the module will either be displayed or, when it // is displayed already, will be hidden again. // // If you change the value of displayTopModule to 1, the top module will be displayed // by default. Set it's value to 0 if you don't want this. // displayTopModule = 1; allTables = document.getElementsByTagName('table'); leftSideModules = new Array(); for (i=0; i<allTables.length; ++i) { if (allTables[i].className == 'left') { allTables[i].id = 'leftsidemod' + leftSideModules.length; leftSideModules.push(allTables[i]); } } function toggleDisplayOrHide(anElement,idNr) { extraRow = document.getElementById(idNr).getElementsByTagName('TR')[2]; if (anElement.style.display == 'none') { anElement.style.display = '' if (extraRow) document.getElementById(idNr).getElementsByTagName('TR')[2].style.display = ''; } else { anElement.style.display = 'none'; if (extraRow) document.getElementById(idNr).getElementsByTagName('TR')[2].style.display = 'none'; } } headerLinkColor = ''; topStyleSheet = document.getElementsByTagName('style')[0]; if (document.URL.indexOf('weblogs')) topStyleSheet = document.getElementsByTagName('style')[1]; if (topStyleSheet) { searchStr = 'table.left TH { color: '; searchStrPos = topStyleSheet.innerHTML.indexOf(searchStr); if (searchStrPos) { searchStrPos = searchStrPos + searchStr.length; headerLinkColor = topStyleSheet.innerHTML.substring(searchStrPos, searchStrPos + 7); } } for (n = 0; n<leftSideModules.length; ++n) { if (navigator.userAgent.indexOf('Opera') == -1) { temp1 = leftSideModules[n].getElementsByTagName('TH')[0].innerHTML; temp2 = '<a href=\"#\" onclick=\"java script:toggleDisplayOrHide(document.getElementById(' + '\'' + leftSideModules[n].id + '\').getElementsByTagName(\'TR\')[1],\'' + leftSideModules[n].id + '\'); return false;\" style=\"text-decoration: none; color: ' + headerLinkColor + ';\">' + temp1 + '</a>'; leftSideModules[n].getElementsByTagName('TH')[0].innerHTML = temp2; if ((n == 0) && (displayTopModule == 1)) leftSideModules[n].getElementsByTagName('TR')[1].style.display = '' else leftSideModules[n].getElementsByTagName('TR')[1].style.display = 'none'; if (leftSideModules[n].getElementsByTagName('TR')[2]) leftSideModules[n].getElementsByTagName('TR')[2].style.display = 'none'; } } </script> |
|
|
![]() ![]() |