User:Jerricks/ChatStylejs

'); } // Adds the dropdown menu to the rail. if (styleSwitcherLoaded==0){   for (i=0; i < stylesheetsArray.length; i++) {        $(".stylechanger").append(""+stylesheetsArray[i].name+" ");    }    styleSwitcherLoaded = 1; } // Adds the styles to the dropdown. function report(styleIDtext) {    if (styleIDtext!="default") {        styleID = parseInt(styleIDtext); //Gets the ID of the selected style	    $('#skinBackground').remove; //Removes old style	    $('#ChatSkins').remove; //Removes old style        $('#ChatSkinsAdditional').remove; //Removes old style        $('#ChatSkinsTransparent').remove; //Removes old style        $('#HeaderLogo').remove; //Removes old style        ssSkinType = stylesheetsArray[styleID].name; //Sets page variable ssSkinType to the new skin        $.cookie('ssSkinType',styleID,{expires: 5}); //Sets cookie ssSkinType to the new skin ID        if (stylesheetsArray[styleID].clear == true) { $('head').append(''); //Adds the clearBase CSS if required (for image-background skins) }       $('head').append(''); //Adds the new skin CSS if (stylesheetsArray[styleID].logo != null) { $('#ChatHeader').append(''); //If a logo is defined in the stylesheetArray, add it to the header. } else { $('#ChatHeader').append(''); //If a logo is not defined in the stylesheetArray, use the default. }   } else { styleID = parseInt(ssDefaultSkin); //Gets the ID of the default skin $('#skinBackground').remove; //Removes old style $('#ChatSkins').remove; //Removes old style $('#ChatSkinsAdditional').remove; //Removes old style $('#ChatSkinsTransparent').remove; //Removes old style $('#HeaderLogo').remove; //Removes old style ssSkinType = stylesheetsArray[styleID].name; //Sets page variable ssSkinType to the new skin $.cookie('ssSkinType',styleID,{expires: 5}); //Sets cookie ssSkinType to the new skin ID       if (stylesheetsArray[styleID].clear == true) { $('head').append(''); //Adds the clearBase CSS if required (for image-background skins) }       $('head').append(''); //Adds the new skin CSS if (stylesheetsArray[styleID].logo != null) { $('#ChatHeader').append(''); //If a logo is defined in the stylesheetArray, add it to the header. } else { $('#ChatHeader').append(''); //If a logo is not defined in the stylesheetArray, use the default. }   } } // Circle toggler function circleToggle { if (ssCircleType=="circle") { $('#ChatSkinsCircle').remove; $.cookie('ssCircleType','square',{expires: 5}); ssCircleType = "square"; } else { $('head').append(''); $.cookie('ssCircleType','circle',{expires: 5}); ssCircleType = "circle"; } } // Alignment toggler function alignToggle { if (ssAlignType=="left") { $('#ChatSkinsLeft').remove; $.cookie('ssAlignType','right',{expires: 5}); ssAlignType = "right"; $("a.align-button").text("Left"); } else { $('head').append(''); $.cookie('ssAlignType','left',{expires: 5}); ssAlignType = "left"; $("a.align-button").text("Right"); } } // Loader for cookied skin report(ssSkinType); if ($.cookie("ssAlignType") == "left") { alignToggle; } if ($.cookie("ssCircleType") == "circle") { circleToggle; } // Finalise console.log("[STYLE] Loaded StyleSwitcher version 2.0.2.4");