Linux altar53.supremepanel53.com 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64
/ home/ bdapparelinfo/ hi-techplasticltd.com/ Wp-Administrator/ _files/ |
|
var twitter=function(){var profileColorAttributes=["background_color","text_color","link_color","sidebar_fill_color","sidebar_border_color"];var rtn={updateUrl:function(value){$("#username_url").html(value)},checkNameAvailability:function(){$.ajax({type:"GET",url:"/users/username_available",data:{username:$("#user_screen_name").val()},dataType:"json",success:function(results){var msg=eval(results).msg;var color=results.color;$("#username_msg").html(msg).css("color",color);$("#username_url").css("color",color)},complete:function(){$("#avail_check_indicator").fadeOut("medium",function(){$("#username_msg").fadeIn("medium")});clearTimeout(_tmp.checkNameAvailabilityTimer)}})},screenNameKeyUp:function(){jQuery("#user_screen_name").keyup(function(event){var screen_name=jQuery("#user_screen_name");if(screen_name.val()!=""){if(jQuery.inArray(event.keyCode,[16,17,18,20,27,33,34,35,37,38,39,40,144])==-1){clearTimeout(_tmp.checkNameAvailabilityTimer);jQuery("#username_url").html(screen_name.val());if(jQuery("#avail_check_indicator").css("display")=="none"){jQuery("#username_msg").fadeOut("medium",function(){jQuery("#avail_check_indicator").fadeIn("medium")})}_tmp.checkNameAvailabilityTimer=setTimeout("twitter.checkNameAvailability()",2000)}}})},setTZ:function(){var tr=$("#time_zone_select_row");$("#user_time_zone").children("option").each(function(i,option){var o=$(option)[0];if(o.text.match(new RegExp("..."+((new Date().getTimezoneOffset()/60)*(-1)).toString().replace(/(.)([0-9])$/,"$10$2")))){$("#user_time_zone").attr("selectedIndex",o.index-1);o.selectedIndex=o.index;return false}})},updateColors:function(){var background=$("#user_profile_background_color").val();var side=$("#user_profile_sidebar_fill_color").val();var text=$("#user_profile_text_color").val();var link=$("#user_profile_link_color").val();var border=$("#user_profile_sidebar_border_color").val();$("body").css({"background-color":background,color:text});$("#side_base").css({"background-color":side,"border-color":border});$(".stats td+td").css("border-color",border);$("#side div.section-header h3.faq-header").css("border-color",border);$("#side a").css("color",link);$("#design_customization a").css("color",link);$("#navigation a").css("color",link);$("#footer a").css("color",link);if($("#backgrounds").css("display")!="none"){$("#current_tab").val("backgrounds")}else{if($("#colors").css("display")!="none"){$("#current_tab").val("colors")}else{$("#current_tab").val("none")}}},setBackgroundImage:function(imageURL,tiled){if((tiled===true)||(tiled===false)){tiled=tiled}else{if($("#user_profile_background_tile:checked").val()){tiled=true}else{tiled=false}}$("#user_profile_use_background_image").val(imageURL=="none"?"false":"true");$("body").css({"background-image":imageURL=="none"?"none":"url('"+imageURL+"')","background-repeat":tiled?"repeat":"no-repeat","background-attachment":tiled?"scroll":"fixed"});$("#user_profile_background_image").val(imageURL)},setTheme:function(id){_tmp.hasCustomBackgroundImage=false;var theme=themes[id];$("#user_profile_background_tile").attr("checked",theme.tiled);$("#current_background span").css("backgroundImage","url('"+theme.swatch+"')");$.each(profileColorAttributes,function(){$("#user_profile_"+this).val(theme[this]).css("background-color",theme[this])});$("#themes").attr("class","theme"+id);_tmp.currentImage=theme.image;twitter.setBackgroundImage(theme.image,theme.tiled);if(theme.image!="none"){$("#current_background").addClass("active")}else{$("#no_background").addClass("active")}$("#user_profile_default").val(true);$("#user_profile_theme").val(id)},isDefaultDesign:function(){var theme=themes[$("#user_profile_theme").val()];if($("#user_profile_use_background_image").val()=="false"||$("#user_profile_background_tile").attr("checked")!=theme.tiled||($("#file").val()||_tmp.hasCustomBackgroundImage)){return false}var _isdefaultdesign=true;$.each(profileColorAttributes,function(){if($("#user_profile_"+this).val()!=theme[this]){_isdefaultdesign=false}});if(!_isdefaultdesign){return false}return true},validateDefaultDesign:function(){$("#user_profile_default").val(twitter.isDefaultDesign())},synchColors:function(event){var colorWell=twitter.colorPicker.linked;if(colorWell&&colorWell.value&&colorWell.value!=twitter.colorPicker.color){colorWell.value=twitter.colorPicker.color;$(colorWell).css({"background-color":colorWell.value,color:twitter.colorPicker.hsl[2]>0.5?"#000":"#fff"});twitter.updateColors()}},initProfileDesign:function(){$("#title_picker a").click(function(){$("#colors").toggle();$("#backgrounds").hide();$("#title_background").removeClass("active");if($("#colors").css("display")=="none"){$("#title_picker").removeClass("active");$("#title_background").removeClass("inactive")}else{$("#title_picker").addClass("active");$("#title_background").addClass("inactive")}if($("#user_profile_default").val()){$("#user_profile_default").val(false)}return false});$("#title_background a").click(function(){$("#backgrounds").toggle();$("#colors").hide();$("#title_picker").removeClass("active");if($("#backgrounds").css("display")=="none"){$("#title_background").removeClass("active");$("#title_picker").removeClass("inactive")}else{$("#title_background").addClass("active");$("#title_picker").addClass("inactive")}return false});$("#themes a").click(function(){var id=$(this).attr("id");twitter.setTheme(id.substring(5));return false});$("#backgrounds a").click(function(){$("#backgrounds a").removeClass("active");$(this).addClass("active");var bgid=$(this).attr("id");if(bgid=="current_background"){twitter.setBackgroundImage(_tmp.currentImage)}else{if(bgid=="no_background"){twitter.setBackgroundImage("none")}}return false});$("#user_profile_background_tile").click(function(){var tiled=$("#user_profile_background_tile:checked").val();$("body").css({"background-repeat":tiled?"repeat":"no-repeat","background-attachment":tiled?"scroll":"fixed"});$("#user_profile_use_background_image").val("true")});twitter.colorPicker=$.farbtastic("#picker",twitter.synchColors);$("#picker").click(function(){$(".colorwell-selected").focus()});var selected;var hexColorChars=(function(){var a=[8,9,13,16,17,18,37,38,39,40,45,46,86,88,90];for(var i=48;i<=57;i++){a.push(i)}for(var i=65;i<=70;i++){a.push(i)}for(var i=96;i<=105;i++){a.push(i)}return a})();$(".colorwell").each(twitter.synchColors).focus(function(){if(selected){$(selected).removeClass("colorwell-selected")}twitter.colorPicker.linked=this;twitter.colorPicker.setColor(this.value);$("#picker").show();$(selected=this).addClass("colorwell-selected")}).blur(function(){var el=$(el);el.val(el.val().toUpperCase())}).keydown(function(event){if($.inArray(event.keyCode,hexColorChars)!=-1){if($.inArray(event.keyCode,[86,88,90])!=-1){return(event.ctrlKey||event.metaKey)}else{if(($.inArray(event.keyCode,[8,46])!=-1)||((event.keyCode==88)&&event.shiftKey)){return($(this).val()!="#")}else{if(event.shiftKey){return($.inArray(event.keyCode,[65,66,67,68,69,70])!=-1)}}}return true}return false}).keyup(function(event){if($(this).val().indexOf("#")!=0){$(this).val("#"+$(this).val())}twitter.colorPicker.setColor(this.value);var c=$(this).val();if(!document.all||(c.length==7||c.length==4)){$(this).css({"background-color":$(this).val(),color:twitter.colorPicker.hsl[2]>0.5?"#000000":"#ffffff"});twitter.updateColors()}});$("#design_customization form a").click(twitter.updateColors)}};return rtn}();