Exploit databaseDownload repository ZIP
GH-67cfe9274a84b2ab15965e26c8740df4
ctlyz123/cve-2020-17496
Sources for CVE-2020-17496
4 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files102
ctlyz123/cve-2020-17496Revision d621d414aa56
- ↑..Parent directory
- blueimp/
- ckeditor/
- ckeplugins/
- colorpicker/
- flatpickr/
- jquery/
- .htaccess
- admin-sbpanel-style.js
- admin-sitebuilder-rollup-560.js
- ajax.js
- announcement-rollup-560.js
- announcement.js
- autocomplete.js
- blog-rollup-560.js
- blog_summary.js
- channel-rollup-560.js
- channel_conversation.js
- ckeditor-rollup-560.js
- ckeditor.js
- colorpicker.js
- colorpicker.min.js
- config-site.js
- contactus.js
- content-entry-rollup-560.js
- content-slider.js
- content_entry_box.js
- conversation-rollup-560.js
- conversation.js
- conversation_filter.js
- css_b_comp_menu_dropdown.js
- css_b_comp_menu_horizontal.js
- css_b_form_select_example.js
- css_b_tabbed_pane.js
- deleteditems.js
- dev-apiform.js
- dev-markup-library.js
- facebook.js
- file-upload-rollup-560.js
- fileupload.js
- flatpickr.js
- footer-rollup-560.js
- fullcalendar-rollup-560.js
- global-head.js
- global.js
- group-home-rollup-560.js
- group_summary.js
- groupadmin-rollup-560.js
- header-rollup-560.js
- help.js
- history.js
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
html/js/vbulletin_stylegenerator.js
JavaScript · 22,537 byteswindow.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["style_generator_browser_not_supported","style_generator","show_tooltips","hide_tooltips","enter_hex_value","enter_distance_angle","enter_complement_hue","enter_hue","err_invalid_name","err_order_need_name","err_order_need_order","err_order_negative","err_order_too_large","done","error","saved_style_x_successfully","primary_color","enter_hex","primary0_info","primary1_info","primary2_info","primary3_info","primary4_info","secondary0_info","secondary1_info","secondary2_info","secondary4_info","warning"]);var drag={on:false,dot:null};var defs={FPSlimiter:10,MaxRedrawRate:200,dotSize:6,wheelMid:{X:190,Y:190},sliderMid:{X:95,Y:95},sliderWidth:140,CBPreview:0};var API={on:false};var SchemeID,styleGeneratorContent;$("#edit-content .tab-item a[id!=colorStyleTab]").on("click",function(){changePreview("","default")});$("#colorStyleTab").on("click",function(){var A=parseInt($.browser.version,10);if($.browser.msie&&A<7){openAlertDialog({title:vBulletin.phrase.get("warning"),message:vBulletin.phrase.get("style_generator_browser_not_supported"),iconType:"warning"});return }if(typeof styleGeneratorContent=="undefined"){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/render/style_generator",success:function(B){styleGeneratorContent=B;$("#color-style").html(B);showStyleGenerator()},error_phrase:"error_fetching_dialog"});return }showStyleGenerator()});function showStyleGenerator(){$("#jscheck").hide();$("#color-style").show().find("select.custom-dropdown").selectBox().end().find("a").on("click",function(){$(this).blur()});$("#model a").on("click",function(){setScheme(this.id);return false});$("#tab-wheel").on("click",function(){togglePane("wheel");return false});$("#tab-vars").on("click",function(){togglePane("vars");return false});$("#wheel,#saturation,#contrast").on("mousedown",function(H){H.preventDefault();var J=$(this);var I=J.offset();drag.on=true;drag.dW=J.width();drag.dH=J.height();drag.dX=I.left+drag.dW/2;drag.dY=I.top+drag.dH/2;J.on("mousemove",function(K){K.preventDefault();dragMove(K,this)});if(!drag.dot){dragMove(H,this)}}).on("mouseup",function(H){H.preventDefault();$(this).off("mousemove");drag.on=false;drag.dot=null;updateColorData()});$(".dot").on("mousedown",function(H){drag.dot=this}).on("mouseup",function(H){drag.dot=null});$("#dot1").on("dblclick",enterHue);$("#hue-val").on("click",enterHue);$("#dot2").on("dblclick",enterComplHue);$("#dot3").on("dblclick",enterDist);$("#dist-val").on("click",enterDist);$("#rgb-val").on("click",enterRGB);$("#sample-val").on("dblclick",function(I){var H=prompt(vBulletin.phrase.get("enter_hex"))});toggleContrast();$("#tab-light-ps").on("click",function(){pagePreview("light-ps");return false});$("#tab-light-pt").on("click",function(){pagePreview("light-pt");return false});$("#tab-grey").on("click",function(){pagePreview("grey");return false});$("#tab-dark").on("click",function(){pagePreview("dark");return false});$("#menu a").on("click",function(H){H.preventDefault();$(this).blur()});$("#menu-undo").on("click",function(){History.back();return false});$("#menu-redo").on("click",function(){History.fwd();return false});$("#save-color-style").on("click",function(){exportCols();return false});$("#menu-tooltips").on("click",function(){useShowTooltips();return false});$("#preview-palette .cbox").on("click",function(){if($("#tab-vars").hasClass("sel")&&UseManualVars){var H=$(this).attr("rel");var I=H.split("-");I=I[0];$("#manualvars a.ttl").filter(function(){return $(this).attr("rel")==I}).click();$("#manualvars a.col").filter(function(){return $(this).attr("rel")==H}).click()}return false});showTooltips();History.updateMenu();var D=document.location.search.substring(1);if(D){D=D.split("&");var C,A,E,B,G;API.data={};for(C=0,A=D.length;C<A;C++){E=D[C].split("=");B=E[0].toString();G=E[1].toString();API.data[B]=G}if(API.data.returnurl){API.on=true;if(API.data.format!="hex"&&API.data.format!="rgb"){API.data.format="hex"}if(API.data.method!="get"&&API.data.method!="post"){API.data.format="get"}}}var F=document.location.hash.substring(1);if(F){loadScheme(F)}else{loadScheme("3E11TvVw5w0w0");usePreset("default");updateScheme();if(Palette.UseVarsOverlay){toggleContrast()}}populatePaletteText("light-ps");changePreview()}function setStyleAttr(D,A,C,B){if(D instanceof $&&D.length>0){return D.each(function(){var E=$(this),G=E.attr("style")?E.attr("style").split(";"):[],F=[];$.each(G,function(I,H){if(A==$.trim(H.split(":")[0])){F.push("{0}:{1}{2}".format(A,C,(B?" !important":"")))}else{F.push(H)}});if(!E.data("orig-style")&&E.attr("style")){E.data("orig-style",E.attr("style"))}E.attr("style",F.join(";"))})}return $()}function loadScheme(A){Palette.unserialize(A);updateScheme();if(Palette.UseVarsOverlay){toggleContrast()}}function togglePane(B,A){if(A==undefined){var A=true}if(!$("#tab-"+B).hasClass("sel")){$(".pane").hide();$("#pane-"+B).fadeIn(250);$("#tabs-color a").removeClass("sel");$("#tab-"+B).addClass("sel").blur()}if(B=="wheel"){updateWheel();$("#manualvars a.sel").removeClass("sel");$("#manualvars a#pal-pri-0").addClass("sel")}else{if((B=="vars")&&(A)){updateVars();setOriginalColor()}}}function toggleContrast(A){if(A=="c1"){Palette.resetVarsOverlay()}else{$("#manualvars, #ttl-c2").fadeIn(750);UseManualVars=true}updateVars()}function setScheme(A){Palette.setScheme(A);updateScheme()}function usePreset(B){if(!B){return }var A=Palette.usePreset(B);updateVars()}function useColorBlind(A){defs.CBPreview=A;$("#menu-vision, #colorblind a").removeClass("sel");if(A>0){$("#menu-vision").addClass("sel");$("#colorblind a").eq(A).addClass("sel");$("#cb-warning").show()}else{$("#cb-warning").hide()}colorize()}function useShowTooltips(){var A=!$("#menu-tooltips").hasClass("sel");if(A){showTooltips()}else{hideTooltips()}}function checkFPS_on(){}function checkFPS_off(){}function updateScheme(){var A=Palette.Scheme;$("#model a").removeClass("sel");$("#"+A).addClass("sel").blur();$("#dot3").css("display",Boolean(Palette.Sec1)?"block":"none");$("#dist-val").css("display",Boolean(Palette.Sec1)?"block":"none");updateWheel();if($("#tab-vars").hasClass("sel")){updateVars()}}function updateWheel(){checkFPS_on();moveDot(1,Palette.Primary);moveDot(3,Palette.Sec1);var A=Palette.Primary.Col[0].RGB;$("#hue-val span").html(Palette.H+"°");$("#rgb-val span").text(A.getHex());$("#rgb-r").html(Math.round(A.R/255*100)+" %");$("#rgb-g").html(Math.round(A.G/255*100)+" %");$("#rgb-b").html(Math.round(A.B/255*100)+" %");$("#dist-val span").html(Palette.Dist+"°");colorize();checkFPS_off()}function updateVars(){if(UseManualVars){updateManualVars()}else{$("#saturation").css("background-color",Palette.Primary.Base.RGB.getCSS());updateContrast()}updateSV()}function updateSV(){checkFPS_on();var A,C;if(UseManualVars){var B=Palette.getVarOverlay(VarSelected[0],VarSelected[1]);A=B[0];C=B[1];A=A-0.5;C=C-0.5;moveSliderDot("#dots,#dotv"+VarSelected[1],A,-C)}else{A=Palette.dS;C=Palette.dV;A=A<0?(A+1)*0.9-0.5:0.4+A*0.1;C=C<0?(C+1)*0.9-0.5:0.4+C*0.1;moveSliderDot("#dots",A,-C)}colorize();checkFPS_off()}function updateContrast(){checkFPS_on();var A=Palette.cL,B=Palette.cS;moveSliderDot("#dotc",A-0.5,0.5-B);colorize();checkFPS_off()}var UseManualVars=false;var VarSelected=[0,0];var ColorHash={pri:0,sec1:1,sec2:2,compl:3};function updateManualVars(){function A(J,I,C){var H,F,D,G='<a class="ttl" rel="'+I+'" href="#"></a>';G+='<ul class="var-set" id="">';for(var E=0;E<5;E++){H=J.getVarRGB(E).getHex();F=I+"-"+E;G+='<li><a class="col" id="pal-'+F+'" rel="'+F+'" href="#"><img src="'+pageData.baseurl+'/images/style_generator/e.png" id="cbox-bg-'+F+'" class="cbox bg-'+F+'" />';G+='<span id="info-'+I+"-"+E+'" class="paletteInfo"></span>';G+="</a></li>"}G+="</ul>";return G}var B='<ul class="palettedisplay">';B+="<li>"+A(Palette.Primary,"pri","")+"</li>";B+="<li>"+A(Palette.Sec1,"sec1","")+"</li>";B+="</ul>";$("#manualvars").html(B);$("#manualvars a.ttl").on("click",function(){var D,C,E=$(this).attr("rel");for(D=0;D<5;D++){C=Palette.getVarOverlay(ColorHash[E],D);moveSliderDot("#dotv"+D,C[0]-0.5,-C[1]+0.5)}if($(this).next(".var-set").hasClass("sel")){return false}$("#manualvars .var-set.sel").removeClass("sel").slideUp("fast");$(this).blur().next(".var-set").addClass("sel").slideDown("fast").find("a.col").eq(0).click();return false});$("#manualvars a.col").on("mouseenter",function(){var C=$("#preview-palette").find(".bg-"+$(this).attr("rel")).addClass("hilite")}).on("mouseleave",function(){var C=$("#preview-palette").find(".bg-"+$(this).attr("rel")).removeClass("hilite")}).on("click",function(){$("#manualvars a.sel").removeClass("sel");$(this).blur().addClass("sel");VarSelected=$(this).attr("rel").split("-");VarSelected[0]=ColorHash[VarSelected[0]];$("#saturation").css("background-color",Palette.getColorByIdx(VarSelected[0]).Base.RGB.getCSS());setOriginalColor();updateSV();return false});$("#manualvars a.ttl").eq(0).click();$("#manualvars a.col").on("click",function(){togglePane("vars",false)});populatePaletteText($("#tabs-preview a.sel").attr("id").replace(/tab-/g,""))}function exportCols(){if(check_save_valid!==undefined){if(!check_save_valid()){return false}}function B(H){var G=[];for(var F=0;F<5;F++){v=H.getVarRGB(F);G.push({hex:v.getHex(),r:v.R,g:v.G,b:v.B})}return G}var A={primary:B(Palette.Primary)};if(Palette.Sec1){A.secondary=B(Palette.Sec1)}if(Palette.Compl){A.complement=B("Palette.Compl")}var E=$("#styleform #form-name").val();var C=$("#styleform select[name=parentid]");var D=C.val();vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/style/saveGeneratedStyle",error_phrase:"style_errors",data:{type:$(".previewtab.sel").data("type"),id:SchemeID,scheme:A,name:E,parentid:D,displayorder:$("#styleform #form-displayorder").val(),userselect:$("#styleform input:radio[name=userselect]:checked").val()},success:function(F){var G=$("#styleform select[name=parentid] option[value={0}]".format(D));var H=G.data("depth")+2;G.after('<option value="{0}" data-depth="{2}">{1}</option>'.format(F.overwritestyleid,str_repeat(C.data("indent"),H)+E,H));C.val(F.overwritestyleid);$("#styleform #form-name").val("");openAlertDialog({title:vBulletin.phrase.get("done"),message:vBulletin.phrase.get("saved_style_x_successfully",E)})}})}function pagePreview(A){var B=$("#tabs-preview a.sel").attr("id").replace("tab-","");$("a.previewtab").removeClass("sel");$("#tab-"+A).addClass("sel").blur();$("a.previewing").removeClass("selected");$("li.savemenu").removeClass("selected");$("#menu-"+A).addClass("selected").blur();$("#menu-export-"+A).addClass("selected").blur();populatePaletteText(A);changePreview(B,A);colorize()}function changePreview(B,G){function A(I){$.each(I,function(J,K){$(J).removeClass(K);$(J).attr("style",$(J).data("orig-style"))})}function F(I){$.each(I,function(J,K){$(J).addClass(K);$(J).css("background-color","")})}var E={"#vb-page-body":"col-pri-0","#wrapper":"bg-pri-3","#header":"bg-pri-2","#channel-tabbar, #channel-subtabbar, #footer-subtabbar, #footer-tabbar":"bg-pri-2","#channel-tabbar ul, #channel-subtabbar ul, #footer-subtabbar ul, #footer-tabbar ul.nav-list":"bg-sec1-0","#channel-tabbar ul li, #channel-subtabbar ul li, #footer-subtabbar ul li, #footer-tabbar ul.nav-list li":"bg-sec1-0","#channel-tabbar ul li a, #channel-subtabbar ul li a, #footer-subtabbar ul li a, #footer-tabbar ul.nav-list li a":"col-pri-1",".canvas-widget":"bg-pri-1","#subforumdescription":"bg-pri-3","#footer-tabbar":"bg-pri-2",".topic-title":"col-pri-2",".b-post-control__label":"col-pri-2",".widget-content, .post-content":"col-pri-0",};var D={"#wrapper":"bg-wh-sec0","#vb-page-body":"col-pri-1","#channel-tabbar, #channel-subtabbar, #footer-subtabbar, #footer-tabbar":"bg-pri-1","#channel-tabbar ul, #channel-subtabbar ul, #footer-subtabbar ul, #footer-tabbar ul.nav-list":"bg-pri-1","#channel-tabbar ul li, #channel-subtabbar ul li, #footer-subtabbar ul li, #footer-tabbar ul.nav-list li":"bg-pri-2","#channel-tabbar ul li a, #channel-subtabbar ul li a, #footer-subtabbar ul li a, #footer-tabbar ul.nav-list li a":"col-pri-1",".canvas-widget":"bg-wy-sec0",".topic-title":"col-pri-0",".b-post-control__label":"col-pri-0",".widget-content, .post-content":"col-pri-0",".list-item":"bg-wy-sec0"};var C={"#vb-page-body":"bg-gy-pri0","#wrapper":"bg-gy-sec0","#header":"bg-gy-pri0","#channel-tabbar, #channel-subtabbar, #footer-subtabbar, #footer-tabbar":"bg-gy-pri0","#channel-tabbar ul, #channel-subtabbar ul, #footer-subtabbar ul, #footer-tabbar ul.nav-list":"bg-pri-0","#channel-tabbar ul li, #channel-subtabbar ul li, #footer-subtabbar ul li, #footer-tabbar ul.nav-list li":"bg-pri-0",".canvas-widget":"bg-gy-sec0","#subforumdescription":"bg-gy-pri0",".topic-title":"col-pri-3",".b-post-control__label":"col-pri-3",".widget-content, .post-content":"col-pri-0",".list-item":"bg-gy-sec0"};var H={"#vb-page-body":"bg-dk-pri0","#wrapper":"bg-dk-pri0","#header":"bg-dk-pri0","#channel-tabbar, #channel-subtabbar, #footer-subtabbar, #footer-tabbar":"bg-dk-pri0","#channel-tabbar ul, #channel-subtabbar ul, #footer-subtabbar ul, #footer-tabbar ul.nav-list":"bg-pri-0","#channel-tabbar ul li, #channel-subtabbar ul li, #footer-subtabbar ul li, #footer-tabbar ul.nav-list li":"bg-pri-0",".canvas-widget":"bg-pri-0","#subforumdescription":"bg-dk-pri0",".topic-title":"col-pri-3",".b-post-control__label":"col-pri-3",".widget-content, .post-content":"col-dk-sec0",".list-item":"bg-dk-sec0"};switch(B){case"light-ps":A(E);break;case"light-pt":A(D);break;case"grey":A(C);break;case"dark":A(H);break;default:A(E);A(D);A(C);A(H)}switch(G){case"light-pt":F(D);break;break;case"grey":F(C);break;case"dark":F(H);break;case"default":break;case"light-ps":default:F(E)}}var LastRefresh=0,RefreshTimerID;function colorize(){var A=new Date().valueOf();var B=A-LastRefresh;if(B<defs.MaxRedrawRate){if(!RefreshTimerID){RefreshTimerID=setTimeout(doColorize,defs.MaxRedrawRate-B)}}else{doColorize()}}function doColorize(){if(RefreshTimerID){clearTimeout(RefreshTimerID)}RefreshTimerID=null;LastRefresh=new Date().valueOf();var F,E,G,A;$(".bg-pri").css("background-color",Palette.Primary.Base.RGB.getCSS());for(var D=0;D<5;D++){G=Palette.Primary.Col[D];if(Palette.Sec1){A=Palette.Sec1.Col[D]}else{A=Palette.Primary.Col[3]}F=G.RGB;E=A.RGB;if(defs.CBPreview){F="#"+ColorBlind.getHex(F.R,F.G,F.B,defs.CBPreview);E="#"+ColorBlind.getHex(E.R,E.G,E.B,defs.CBPreview)}else{F=F.getCSS();E=E.getCSS()}var C=parseInt($.browser.version,10);if($.browser.msie&&C==7){$("#cbox-bg-pri-"+D).attr("title",rgb2hex(F));$("#cbox-bg-sec1-"+D).attr("title",rgb2hex(E))}$(".col-pri-"+D).css("color",F);$(".col-sec1-"+D).css("color",E);$(".bg-pri-"+D).css("background-color",F).each(function(){this.paletteInfo={col:G,out:F}});$(".bg-sec1-"+D).css("background-color",E).each(function(){this.paletteInfo={col:A,out:E}});$("#currentcolor").css("background-color",$(".var-set .sel img").css("background-color"));$(".brd-pri-"+D).css("border-color",F);$(".brd-sec1-"+D).css("border-color",E)}SchemeID=Palette.serialize();var B=SchemeID;if(B.length>64){B="ID too long to display"}$("#schemeid a").html(B).attr("href",document.location.pathname+"#"+SchemeID);if(!drag.on){updateColorData()}}function updateColorData(){History.add();var A=parseInt($.browser.version,10);if($.browser.msie&&A==7){return }}var History={List:[],Ptr:-1,add:function(){setOriginalColor();if(this.Ptr<0||this.List[this.Ptr]!=SchemeID){if(this.List.length>this.Ptr+1){this.List=this.List.splice(0,this.Ptr+1)}this.List.push(SchemeID);this.Ptr++;this.updateMenu()}},back:function(){if(this.Ptr<1){return }this.Ptr--;loadScheme(this.List[this.Ptr]);this.updateMenu()},fwd:function(){if(this.Ptr>=this.List.length-1){return }this.Ptr++;loadScheme(this.List[this.Ptr]);this.updateMenu()},updateMenu:function(){if(this.Ptr>0){$("#menu-undo").removeClass("h-disabled")}else{$("#menu-undo").addClass("h-disabled")}if(this.Ptr<this.List.length-1){$("#menu-redo").removeClass("h-disabled")}else{$("#menu-redo").addClass("h-disabled")}}};var moveTimer=0;function dragMove(B,C){var A=new Date();if(A-moveTimer<defs.FPSlimiter){return false}moveTimer=A;if(C.id=="wheel"){moveOnWheel(B)}else{moveOnSlider(B,C)}}function moveOnWheel(E){var A,H,C,D,G=false,F=false;if(E){A=E.pageX-drag.dX;H=E.pageY-drag.dY;C=Math.round(((Math.atan2(-A,H)*180/Math.PI)+180)%360);D=Math.sqrt(A*A+H*H)}else{G=true,F=true}if(D>60&&D<160){var B="dot1";if(drag.dot){B=drag.dot.id}if(B=="dot1"||B=="dot2"){if(D>125){if(D<135){C=(Math.floor((C-7.5)/15+1)*15)%360}else{C=(Math.floor((C-15)/30+1)*30)%360}}if(B=="dot2"){C=(C+180)%360}G=Palette.setHue(C)}else{if(Palette.Scheme=="m1"&&B=="dot4"){C=(C+180)%360}F=Palette.setDist(C)}}if(G||F){updateWheel()}}function moveOnSlider(F,H){var B=F.pageX-drag.dX;var G=F.pageY-drag.dY;B=B/defs.sliderWidth;G=G/defs.sliderWidth;if(B<-0.5){B=-0.5}if(B>0.5){B=0.5}if(G<-0.5){G=-0.5}if(G>0.5){G=0.5}if(H.id=="saturation"){var E,C;if(UseManualVars){E=B+0.5;C=-G+0.5;Palette.setVarOverlay(VarSelected[0],VarSelected[1],E,C)}else{E=B>0.4?(B-0.4)/0.1:(B+0.5)/0.9-1;G=-G;C=G>0.4?(G-0.4)/0.1:(G+0.5)/0.9-1;Palette.setSV(E,C)}updateSV()}else{if(H.id=="contrast"){var A=B+0.5;var D=0.5-G;Palette.setContrast(D,A);updateContrast()}}}function moveDot(D,A){if(!A){return }var B=A.Col[0].HSV.H;var C=(B-90)/360*2*Math.PI;x=Math.round(defs.wheelMid.X+109*Math.cos(C))-defs.dotSize;y=Math.round(defs.wheelMid.Y+109*Math.sin(C))-defs.dotSize;$("#dot"+D).css("left",x+"px").css("top",y+"px")}function moveSliderDot(B,A,C){A=defs.sliderMid.X+A*defs.sliderWidth-defs.dotSize+1;C=defs.sliderMid.Y+C*defs.sliderWidth-defs.dotSize+3;$(B).css("left",A+"px").css("top",C+"px")}function myPrompt(B,A,C){vBulletin.openPromptDialog({title:vBulletin.phrase.get("style_generator"),message:B,initialValue:A,validation:{callback:vBulletin.openPromptDialog.validationString,showError:true},onClickOK:C})}function getExpr(s){if(!s){return""}s=String(s);if(s.match(/[0-9\.\+\-\*/ ]+/)){s=eval(s)}return s}function enterHue(){myPrompt(vBulletin.phrase.get("enter_hue")+" (0°-360°)",Palette.H,enterHue2)}function enterHue2(A){A=parseInt(getExpr(A),10)%360;if(A>=0&&A<=360){Palette.setHue(A%360);updateWheel()}}function enterComplHue(){myPrompt(vBulletin.phrase.get("enter_complement_hue")+" (0°–360°)",(Palette.H+180)%360,enterComplHue2)}function enterComplHue2(A){A=parseInt(getExpr(A),10)%360;if(A>=0&&A<=360){Palette.setHue((A+180)%360);updateWheel()}}function enterDist(){var B=Palette.SchemeModel.minD,A=Palette.SchemeModel.maxD;myPrompt(vBulletin.phrase.get("enter_distance_angle")+" ("+B+"°–"+A+"°)",Palette.Dist,enterDist2)}function enterDist2(B){var C=Palette.SchemeModel.minD,A=Palette.SchemeModel.maxD;B=Math.abs(parseInt(getExpr(B),10));if(B>=C&&B<=A){Palette.setDistNum(B);updateWheel()}}function enterRGB(){myPrompt(vBulletin.phrase.get("enter_hex_value")+" (000000–FFFFFF)",Palette.Primary.getVarRGB(0).getHex(),enterRGB2)}function enterRGB2(D){if(!D){return""}D=String(D);if(D.match(/^\s*#?([0-9a-f]{6}|[0-9a-f]{3})\s*$/i)){if(D.length==3){D="#"+D}if(D.length==4){D=D.substr(1,1)+D.substr(1,1)+D.substr(2,1)+D.substr(2,1)+D.substr(3,1)+D.substr(3,1)}if(D.length==6){D="#"+D}D=D.substr(1,6);var F=hex2dec(D.substring(0,2));var E=hex2dec(D.substring(2,4));var A=hex2dec(D.substring(4,6));var C=new RGB(F,E,A);var B=ColorWheel.getColorByRGB(C);Palette.setHSV(B);updateWheel()}}function showTooltips(){$("#menu-tooltips").addClass("sel").html(vBulletin.phrase.get("hide_tooltips"))}function hideTooltips(){$("#menu-tooltips").removeClass("sel").html(vBulletin.phrase.get("show_tooltips"))}function populatePaletteText(A){var F=$("#debug-information").length==1;switch(A){case"light-ps":var D=palInfoColorPri;var E=palInfoColorSec;break;case"light-pt":var D=palInfoWhitePri;var E=palInfoWhiteSec;break;default:var D=palInfoDarkPri;var E=palInfoDarkSec}var C=function(I,H,G,J){$("#pal-"+I+"-"+H).parent().toggleClass("h-hide-imp",G=="");if(G!=""){$("#info-"+I+"-"+H).html(vBulletin.phrase.get(G)+(F?" ("+J+" "+H+")":""))}};for(var B=0;B<5;B++){C("pri",B,D[B],"Primary");C("sec1",B,E[B],"Secondary")}}function rgb2hex(A){A=A.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(!A){return""}return"#"+hex(A[1])+hex(A[2])+hex(A[3])}function hex(A){hexDigits=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");return isNaN(A)?"00":hexDigits[(A-A%16)/16]+hexDigits[A%16]}function setOriginalColor(){$("#originalcolor").css("background-color",$("#manualvars a.sel img").css("background-color"))}function check_save_valid(){var B=document.getElementById("form-name");if(B===null){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_order_need_name"),iconType:"warning"});return false}B.value=$.trim(B.value);if(B.value==""){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_order_need_name"),iconType:"warning",onAfterClose:function(){B.focus()}});return false}if(B.value.length>128||B.value.indexOf("'")!==-1||B.value.indexOf('"')!==-1){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_invalid_name"),iconType:"warning",onAfterClose:function(){B.focus()}});return false}var A=document.getElementById("form-displayorder");if(A===null){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_order_need_order"),iconType:"warning"});return false}if(isNaN(parseInt(A.value))){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_order_need_order"),iconType:"warning",onAfterClose:function(){A.focus()}});return false}if(parseInt(A.value)<=0){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_order_negative"),iconType:"warning",onAfterClose:function(){A.focus()}});return false}if(parseInt(A.value)>=1000){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_order_too_large"),iconType:"warning",onAfterClose:function(){A.focus()}});return false}return true}var palInfoColorPri=["primary0_info","primary1_info","primary2_info","primary3_info","primary4_info"];var palInfoColorSec=["secondary0_info","secondary1_info","secondary2_info","","secondary4_info"];var palInfoWhitePri=["primary0_info","primary1_info","primary2_info","",""];var palInfoWhiteSec=["","","","",""];var palInfoDarkPri=["primary0_info","","","primary3_info",""];var palInfoDarkSec=["","","","",""];