From c95e7dd33010bdf23d9bd4482acc156a9319c7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Siim=20Ha=CC=88elm?= Date: Tue, 26 Jun 2018 13:12:49 +0300 Subject: [PATCH] Normalize imageSizes string value if pg-picker has no picture --- javascripts/application.js | 10 +++++++++- javascripts/application.min.js | 2 +- sources/javascripts/concat/main.js | 10 +++++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/javascripts/application.js b/javascripts/application.js index 6892ded..345947f 100644 --- a/javascripts/application.js +++ b/javascripts/application.js @@ -754,11 +754,19 @@ MMCQ = (function() { $(frontPageContent).find('.js-bgpicker-cover-color').css({'background-color' : frontPageContentBgColor}); }; + var normalizeValue = function(value) { + if (value == null || (typeof value == 'string' && value.match(/^[\\'"]+$/))) { + return ''; + } else { + return value; + } + }; + // Header background image and color save logic function. var frontPageContentCoverBgCommit = function(data, dataName) { var commitData = $.extend(true, {}, data); commitData.image = data.image || ''; - commitData.imageSizes = data.imageSizes || ''; + commitData.imageSizes = normalizeValue(data.imageSizes); commitData.color = data.color || 'rgba(255,255,255,0)'; commitData.combinedLightness = frontPageContentCoverCombinedLightness; pageData.set(dataName, commitData); diff --git a/javascripts/application.min.js b/javascripts/application.min.js index 542b48a..630f327 100644 --- a/javascripts/application.min.js +++ b/javascripts/application.min.js @@ -1 +1 @@ -var MMCQ,PriorityQueue;PriorityQueue=function(){function t(t){this.comparator=t,this.contents=[],this.sorted=!1}return t.prototype.sort=function(){return this.contents.sort(this.comparator),this.sotred=!0},t.prototype.push=function(t){return this.contents.push(t),this.sorted=!1},t.prototype.peek=function(t){return null==t&&(t=this.contents.length-1),this.sorted||this.sort(),this.contents[t]},t.prototype.pop=function(){return this.sorted||this.sort(),this.contents.pop()},t.prototype.size=function(){return this.contents.length},t.prototype.map=function(t){return this.contents.map(t)},t}(),MMCQ=function(){function t(){this.maxIterations=1e3,this.fractByPopulations=.75}var o,e,n,r,s,i;return t.sigbits=5,t.rshift=8-t.sigbits,r=function(o,e,n){return(o<<2*t.sigbits)+(e<>t.rshift,n=o[1]>>t.rshift,e=o[2]>>t.rshift,this.r1<=r&&r<=this.r2&&this.g1<=n&&n<=this.g2&&this.b1<=e&&e<=this.b2},o}(),e=function(){function t(){this.cboxes=new PriorityQueue(function(t,o){var e,n;return e=t.count()*t.volume(),n=o.count()*o.volume(),e>n?1:e>t.rshift,n=c[1]>>t.rshift,e=c[2]>>t.rshift,s[a=r(u,n,e)]=(s[a]||0)+1;return s},n=function(e,n){var r,s,i,a,c,u,h,l,g,f,p,d;for(f=1e6,g=0,u=1e6,c=0,i=1e6,s=0,p=0,d=e.length;p>t.rshift,a=h[1]>>t.rshift,r=h[2]>>t.rshift,lg&&(g=l),ac&&(c=a),rs&&(s=r);return new o(f,g,u,c,i,s,n)},i=function(t,o){var e,n,s,i,a,c,u,h,l,g,f,p,d,m,b,v,C,y,x,j,w,k,P,M,_,z,S,B,D,I;if(o.count()){if(1===o.count())return[o.copy()];if(g=o.r2-o.r1+1,a=o.g2-o.g1+1,n=o.b2-o.b1+1,u=Math.max(g,a,n),p=0,h=[],c=[],u===g)for(l=d=o.r1,k=o.r2;d<=k;l=d+=1){for(f=0,i=m=o.g1,S=o.g2;m<=S;i=m+=1)for(e=b=o.b1,B=o.b2;b<=B;e=b+=1)f+=t[r(l,i,e)]||0;p+=f,h[l]=p}else if(u===a)for(i=v=o.g1,D=o.g2;v<=D;i=v+=1){for(f=0,l=C=o.r1,I=o.r2;C<=I;l=C+=1)for(e=y=o.b1,P=o.b2;y<=P;e=y+=1)f+=t[r(l,i,e)]||0;p+=f,h[i]=p}else for(e=x=o.b1,M=o.b2;x<=M;e=x+=1){for(f=0,l=j=o.r1,_=o.r2;j<=_;l=j+=1)for(i=w=o.g1,z=o.g2;w<=z;i=w+=1)f+=t[r(l,i,e)]||0;p+=f,h[e]=p}return h.forEach(function(t,o){return c[o]=p-t}),s=function(t){var e,n,r,s,i,a,u,l,g,f,d;for(a=t+"2",u=f=o[i=t+"1"],d=o[a];f<=d;u=f+=1)if(h[u]>p/2){for(e=o.copy(),n=o.copy(),s=(l=u-o[i])<=(g=o[a]-u)?Math.min(o[a]-1,~~(u+g/2)):Math.max(o[i],~~(u-1-l/2));!h[s];)s++;for(r=c[s];!r&&h[s-1];)r=c[--s];return e[a]=s,n[i]=e[a]+1,[e,n]}},u===g?s("r"):u===a?s("g"):u===n?s("b"):void 0}},t.prototype.quantize=function(t,o){var r,a,c,u,h,l,g=this;if(!t.length||o<2||o>256)return console.log("invalid arguments"),!1;for(c=s(t),r=n(t,c),(h=new PriorityQueue(function(t,o){var e,n;return e=t.count(),n=o.count(),e>n?1:e=o)return;if(u++>g.maxIterations)return void console.log("infinite loop; perhaps too few pixels")}else t.push(r),u++})(h,this.fractByPopulations*o),l=new PriorityQueue(function(t,o){var e,n;return e=t.count()*t.volume(),n=o.count()*o.volume(),e>n?1:el&&(l=a,c=i.rgb);for(l=0,p=0,m=h.length;pl&&i.rgb!==c&&(l=a,u=i.rgb);return g=function(t){return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},n({bgColor:g(r),fgColor:g(c),fgColor2:g(u)})},t}()}.call(this),function(t){var o=function(){return t("html").hasClass("editmode")},e=function(){frontPageContentCoverCombinedLightness>=.5?t(".js-background-type").addClass("light-background").removeClass("dark-background"):t(".js-background-type").addClass("dark-background").removeClass("light-background")},n=function(o,e){return function(o,e){if(o&&e){"string"==typeof o&&(o=o.replace(/rgba?\(/,"").replace(/\)/,"").split(","),t.each(o,function(t,e){o[t]=+e})),"string"==typeof e&&(e=e.replace(/rgba?\(/,"").replace(/\)/,"").split(","),t.each(e,function(t,o){e[t]=+o})),"object"==typeof o&&o.hasOwnProperty("length")&&3==o.length&&o.push(1),"object"==typeof e&&e.hasOwnProperty("length")&&3==e.length&&e.push(1);var n=[0,0,0,0];return n[3]=1-(1-e[3])*(1-o[3]),0===n[3]&&(n[3]=1e-6),n[0]=Math.min(e[0]*e[3]/n[3]+o[0]*o[3]*(1-e[3])/n[3],255),n[1]=Math.min(e[1]*e[3]/n[3]+o[1]*o[3]*(1-e[3])/n[3],255),n[2]=Math.min(e[2]*e[3]/n[3]+o[2]*o[3]*(1-e[3])/n[3],255),t.map(n,function(t){return Math.floor(t)})}}(o||[255,255,255,1],e||[255,255,255,1])},r=function(t,o){var e=n(t,o);return Math.round((.2126*+e[0]+.7152*+e[1]+.0722*+e[2])/2.55)/100};window.site=t.extend(window.site||{},{initBlogPage:function(){},initArticlePage:function(){},initCommonPage:function(){handleFormFieldClick()},toggleFlags:function(){t(".js-option-toggle-flags").on("click",function(o){if(o.stopPropagation(),t(this).hasClass("js-flag-disable-btn"))var e=!1;else e=!0;siteData.set("flags_state",e),t(this).toggleClass("js-flag-disable-btn"),t(".js-menu-lang").toggleClass("flags-enabled flags-disabled")})},frontPageContentCoverBgPreview:function(o,n){var s=t(".js-bgpicker-cover-image").css("background-image"),i=o.imageSizes?function(t,o){for(var e,n=0,r=t.length;n")),l=t(""),g=o.image&&""!==o.image?o.image:null;g?function(t,o){for(var e=t.length;e--;)if(o.indexOf(t[e].url.trim())>-1)return!0;return!1}(c,s)?(frontPageContentCoverCombinedLightness=r(frontPageContentBg.frontPageContentBgImageColor,u),e()):(h.attr("src",g.replace(/.*\/(photos|voogstock)/g,"/photos")),h.on("load",function(){ColorExtract.extract(h[0],l[0],function(t){frontPageContentBg.frontPageContentBgImageColor=t.bgColor?t.bgColor:"rgba(255,255,255,1)",frontPageContentCoverCombinedLightness=r(frontPageContentBg.frontPageContentBgImageColor,u),e()})})):(frontPageContentCoverCombinedLightness=r("rgba(255,255,255,1)",u),e()),t(n).find(".js-bgpicker-cover-image").css({"background-image":a}),t(n).find(".js-bgpicker-cover-color").css({"background-color":u})},frontPageContentCoverBgCommit:function(o,e){var n=t.extend(!0,{},o);n.image=o.image||"",n.imageSizes=o.imageSizes||"",n.color=o.color||"rgba(255,255,255,0)",n.combinedLightness=frontPageContentCoverCombinedLightness,pageData.set(e,n)},handleFrontPageContentCoverColorScheme:function(o){void 0!==o&&(o>.6?t(".header-wrapper").addClass("light").removeClass("dark"):t(".header-wrapper").addClass("dark").removeClass("light"))},bindCustomTexteditorStyles:function(t){window.edy=window.edy||[],edy.push(["texteditorStyles",{name:t,tagname:"a",attribute:{href:"#"},classname:"custom-btn",toggle:!0}])},bindSiteSearch:function(o,e,n){o&&new VoogSearch(o,{per_page:10,lang:e,resultsContainer:t(".js-voog-search-modal-inner").get(0),sideclick:!0,mobileModeWidth:480,updateOnKeypress:!0,noResults:n})}}),t(".content").on("mousedown",function(o){t(o.target).closest(".js-prevent-sideclick").length||t(".js-popover").removeClass("expanded")}),t(".js-menu-btn").click(function(o){o.stopPropagation(),t(this).toggleClass("open"),t(".js-menu-main").toggleClass("expanded"),t(".js-search-close-btn").hasClass("open")&&t(".js-search-close-btn").trigger("click")}),t(".js-menu-lang-btn").click(function(o){o.stopPropagation(),t(".js-menu-lang-popover").toggleClass("expanded")}),t(".js-search-open-btn").click(function(o){o.stopPropagation(),t(".js-menu-main").hasClass("expanded")&&(t(".js-menu-main").removeClass("expanded"),t(".js-menu-btn").removeClass("open")),t(this).addClass("open"),t("body").addClass("search-open"),t(".js-search-close-btn").addClass("open"),t(".js-search").addClass("active"),t(".js-search-inner").css({"margin-top":"-25px"}),t(".js-search-input").val("").focus()}),t(".js-search-close-btn").click(function(o){t(this).removeClass("open"),t("body").removeClass("search-open"),t(".js-search-open-btn").removeClass("open"),t(".js-search").removeClass("active")}),t(".js-search").click(function(t){t.stopPropagation()}),t(document).ready(function(){t(".comment-form").hasClass("form_with_errors")?t("html, body").scrollTop(t(".comment-form").offset().top):t("form").find(".form_error, .form_notice").length>0&&t("html, body").scrollTop(t(".form_error, .form_notice").closest("form").offset().top)}),searchForm=t(".js-search-form"),t(".js-search-input").focus(function(){searchForm.addClass("active")}).blur(function(){searchForm.removeClass("active")}),t(".js-search-form").on("submit",function(){searchModalHeight=t(".js-voog-search-modal").height(),t(".js-modal").css({top:"40px"})}),!1===o&&t.each(t(".content-formatted"),function(){t(this).hasClass("js-custom-content-formatted")||t(this).find("table").wrap('
')}),!Modernizr.flexbox&&o&&function(){var o=t(".js-header").width(),e=t(".js-header-right"),n=e.width(),r=parseInt(e.css("margin-left"))+1;t(".js-header-left").css("min-width",o-n-r)}()}(jQuery); \ No newline at end of file +var MMCQ,PriorityQueue;PriorityQueue=function(){function t(t){this.comparator=t,this.contents=[],this.sorted=!1}return t.prototype.sort=function(){return this.contents.sort(this.comparator),this.sotred=!0},t.prototype.push=function(t){return this.contents.push(t),this.sorted=!1},t.prototype.peek=function(t){return null==t&&(t=this.contents.length-1),this.sorted||this.sort(),this.contents[t]},t.prototype.pop=function(){return this.sorted||this.sort(),this.contents.pop()},t.prototype.size=function(){return this.contents.length},t.prototype.map=function(t){return this.contents.map(t)},t}(),MMCQ=function(){function t(){this.maxIterations=1e3,this.fractByPopulations=.75}var o,e,n,r,s,i;return t.sigbits=5,t.rshift=8-t.sigbits,r=function(o,e,n){return(o<<2*t.sigbits)+(e<>t.rshift,n=o[1]>>t.rshift,e=o[2]>>t.rshift,this.r1<=r&&r<=this.r2&&this.g1<=n&&n<=this.g2&&this.b1<=e&&e<=this.b2},o}(),e=function(){function t(){this.cboxes=new PriorityQueue(function(t,o){var e,n;return e=t.count()*t.volume(),n=o.count()*o.volume(),e>n?1:e>t.rshift,n=c[1]>>t.rshift,e=c[2]>>t.rshift,s[a=r(u,n,e)]=(s[a]||0)+1;return s},n=function(e,n){var r,s,i,a,c,u,h,l,g,f,p,d;for(f=1e6,g=0,u=1e6,c=0,i=1e6,s=0,p=0,d=e.length;p>t.rshift,a=h[1]>>t.rshift,r=h[2]>>t.rshift,lg&&(g=l),ac&&(c=a),rs&&(s=r);return new o(f,g,u,c,i,s,n)},i=function(t,o){var e,n,s,i,a,c,u,h,l,g,f,p,d,m,b,v,C,y,x,j,w,k,P,M,_,z,S,B,D,I;if(o.count()){if(1===o.count())return[o.copy()];if(g=o.r2-o.r1+1,a=o.g2-o.g1+1,n=o.b2-o.b1+1,u=Math.max(g,a,n),p=0,h=[],c=[],u===g)for(l=d=o.r1,k=o.r2;d<=k;l=d+=1){for(f=0,i=m=o.g1,S=o.g2;m<=S;i=m+=1)for(e=b=o.b1,B=o.b2;b<=B;e=b+=1)f+=t[r(l,i,e)]||0;p+=f,h[l]=p}else if(u===a)for(i=v=o.g1,D=o.g2;v<=D;i=v+=1){for(f=0,l=C=o.r1,I=o.r2;C<=I;l=C+=1)for(e=y=o.b1,P=o.b2;y<=P;e=y+=1)f+=t[r(l,i,e)]||0;p+=f,h[i]=p}else for(e=x=o.b1,M=o.b2;x<=M;e=x+=1){for(f=0,l=j=o.r1,_=o.r2;j<=_;l=j+=1)for(i=w=o.g1,z=o.g2;w<=z;i=w+=1)f+=t[r(l,i,e)]||0;p+=f,h[e]=p}return h.forEach(function(t,o){return c[o]=p-t}),s=function(t){var e,n,r,s,i,a,u,l,g,f,d;for(a=t+"2",u=f=o[i=t+"1"],d=o[a];f<=d;u=f+=1)if(h[u]>p/2){for(e=o.copy(),n=o.copy(),s=(l=u-o[i])<=(g=o[a]-u)?Math.min(o[a]-1,~~(u+g/2)):Math.max(o[i],~~(u-1-l/2));!h[s];)s++;for(r=c[s];!r&&h[s-1];)r=c[--s];return e[a]=s,n[i]=e[a]+1,[e,n]}},u===g?s("r"):u===a?s("g"):u===n?s("b"):void 0}},t.prototype.quantize=function(t,o){var r,a,c,u,h,l,g=this;if(!t.length||o<2||o>256)return console.log("invalid arguments"),!1;for(c=s(t),r=n(t,c),(h=new PriorityQueue(function(t,o){var e,n;return e=t.count(),n=o.count(),e>n?1:e=o)return;if(u++>g.maxIterations)return void console.log("infinite loop; perhaps too few pixels")}else t.push(r),u++})(h,this.fractByPopulations*o),l=new PriorityQueue(function(t,o){var e,n;return e=t.count()*t.volume(),n=o.count()*o.volume(),e>n?1:el&&(l=a,c=i.rgb);for(l=0,p=0,m=h.length;pl&&i.rgb!==c&&(l=a,u=i.rgb);return g=function(t){return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},n({bgColor:g(r),fgColor:g(c),fgColor2:g(u)})},t}()}.call(this),function(t){var o=function(){return t("html").hasClass("editmode")},e=function(){frontPageContentCoverCombinedLightness>=.5?t(".js-background-type").addClass("light-background").removeClass("dark-background"):t(".js-background-type").addClass("dark-background").removeClass("light-background")},n=function(o,e){return function(o,e){if(o&&e){"string"==typeof o&&(o=o.replace(/rgba?\(/,"").replace(/\)/,"").split(","),t.each(o,function(t,e){o[t]=+e})),"string"==typeof e&&(e=e.replace(/rgba?\(/,"").replace(/\)/,"").split(","),t.each(e,function(t,o){e[t]=+o})),"object"==typeof o&&o.hasOwnProperty("length")&&3==o.length&&o.push(1),"object"==typeof e&&e.hasOwnProperty("length")&&3==e.length&&e.push(1);var n=[0,0,0,0];return n[3]=1-(1-e[3])*(1-o[3]),0===n[3]&&(n[3]=1e-6),n[0]=Math.min(e[0]*e[3]/n[3]+o[0]*o[3]*(1-e[3])/n[3],255),n[1]=Math.min(e[1]*e[3]/n[3]+o[1]*o[3]*(1-e[3])/n[3],255),n[2]=Math.min(e[2]*e[3]/n[3]+o[2]*o[3]*(1-e[3])/n[3],255),t.map(n,function(t){return Math.floor(t)})}}(o||[255,255,255,1],e||[255,255,255,1])},r=function(t,o){var e=n(t,o);return Math.round((.2126*+e[0]+.7152*+e[1]+.0722*+e[2])/2.55)/100};window.site=t.extend(window.site||{},{initBlogPage:function(){},initArticlePage:function(){},initCommonPage:function(){handleFormFieldClick()},toggleFlags:function(){t(".js-option-toggle-flags").on("click",function(o){if(o.stopPropagation(),t(this).hasClass("js-flag-disable-btn"))var e=!1;else e=!0;siteData.set("flags_state",e),t(this).toggleClass("js-flag-disable-btn"),t(".js-menu-lang").toggleClass("flags-enabled flags-disabled")})},frontPageContentCoverBgPreview:function(o,n){var s=t(".js-bgpicker-cover-image").css("background-image"),i=o.imageSizes?function(t,o){for(var e,n=0,r=t.length;n")),l=t(""),g=o.image&&""!==o.image?o.image:null;g?function(t,o){for(var e=t.length;e--;)if(o.indexOf(t[e].url.trim())>-1)return!0;return!1}(c,s)?(frontPageContentCoverCombinedLightness=r(frontPageContentBg.frontPageContentBgImageColor,u),e()):(h.attr("src",g.replace(/.*\/(photos|voogstock)/g,"/photos")),h.on("load",function(){ColorExtract.extract(h[0],l[0],function(t){frontPageContentBg.frontPageContentBgImageColor=t.bgColor?t.bgColor:"rgba(255,255,255,1)",frontPageContentCoverCombinedLightness=r(frontPageContentBg.frontPageContentBgImageColor,u),e()})})):(frontPageContentCoverCombinedLightness=r("rgba(255,255,255,1)",u),e()),t(n).find(".js-bgpicker-cover-image").css({"background-image":a}),t(n).find(".js-bgpicker-cover-color").css({"background-color":u})},frontPageContentCoverBgCommit:function(o,e){var n=t.extend(!0,{},o);n.image=o.image||"",n.imageSizes=function(t){return null==t||"string"==typeof t&&t.match(/^[\\'"]+$/)?"":t}(o.imageSizes),n.color=o.color||"rgba(255,255,255,0)",n.combinedLightness=frontPageContentCoverCombinedLightness,pageData.set(e,n)},handleFrontPageContentCoverColorScheme:function(o){void 0!==o&&(o>.6?t(".header-wrapper").addClass("light").removeClass("dark"):t(".header-wrapper").addClass("dark").removeClass("light"))},bindCustomTexteditorStyles:function(t){window.edy=window.edy||[],edy.push(["texteditorStyles",{name:t,tagname:"a",attribute:{href:"#"},classname:"custom-btn",toggle:!0}])},bindSiteSearch:function(o,e,n){o&&new VoogSearch(o,{per_page:10,lang:e,resultsContainer:t(".js-voog-search-modal-inner").get(0),sideclick:!0,mobileModeWidth:480,updateOnKeypress:!0,noResults:n})}}),t(".content").on("mousedown",function(o){t(o.target).closest(".js-prevent-sideclick").length||t(".js-popover").removeClass("expanded")}),t(".js-menu-btn").click(function(o){o.stopPropagation(),t(this).toggleClass("open"),t(".js-menu-main").toggleClass("expanded"),t(".js-search-close-btn").hasClass("open")&&t(".js-search-close-btn").trigger("click")}),t(".js-menu-lang-btn").click(function(o){o.stopPropagation(),t(".js-menu-lang-popover").toggleClass("expanded")}),t(".js-search-open-btn").click(function(o){o.stopPropagation(),t(".js-menu-main").hasClass("expanded")&&(t(".js-menu-main").removeClass("expanded"),t(".js-menu-btn").removeClass("open")),t(this).addClass("open"),t("body").addClass("search-open"),t(".js-search-close-btn").addClass("open"),t(".js-search").addClass("active"),t(".js-search-inner").css({"margin-top":"-25px"}),t(".js-search-input").val("").focus()}),t(".js-search-close-btn").click(function(o){t(this).removeClass("open"),t("body").removeClass("search-open"),t(".js-search-open-btn").removeClass("open"),t(".js-search").removeClass("active")}),t(".js-search").click(function(t){t.stopPropagation()}),t(document).ready(function(){t(".comment-form").hasClass("form_with_errors")?t("html, body").scrollTop(t(".comment-form").offset().top):t("form").find(".form_error, .form_notice").length>0&&t("html, body").scrollTop(t(".form_error, .form_notice").closest("form").offset().top)}),searchForm=t(".js-search-form"),t(".js-search-input").focus(function(){searchForm.addClass("active")}).blur(function(){searchForm.removeClass("active")}),t(".js-search-form").on("submit",function(){searchModalHeight=t(".js-voog-search-modal").height(),t(".js-modal").css({top:"40px"})}),!1===o&&t.each(t(".content-formatted"),function(){t(this).hasClass("js-custom-content-formatted")||t(this).find("table").wrap('
')}),!Modernizr.flexbox&&o&&function(){var o=t(".js-header").width(),e=t(".js-header-right"),n=e.width(),r=parseInt(e.css("margin-left"))+1;t(".js-header-left").css("min-width",o-n-r)}()}(jQuery); \ No newline at end of file diff --git a/sources/javascripts/concat/main.js b/sources/javascripts/concat/main.js index eba4cf6..ddf1937 100644 --- a/sources/javascripts/concat/main.js +++ b/sources/javascripts/concat/main.js @@ -213,11 +213,19 @@ $(frontPageContent).find('.js-bgpicker-cover-color').css({'background-color' : frontPageContentBgColor}); }; + var normalizeValue = function(value) { + if (value == null || (typeof value == 'string' && value.match(/^[\\'"]+$/))) { + return ''; + } else { + return value; + } + }; + // Header background image and color save logic function. var frontPageContentCoverBgCommit = function(data, dataName) { var commitData = $.extend(true, {}, data); commitData.image = data.image || ''; - commitData.imageSizes = data.imageSizes || ''; + commitData.imageSizes = normalizeValue(data.imageSizes); commitData.color = data.color || 'rgba(255,255,255,0)'; commitData.combinedLightness = frontPageContentCoverCombinedLightness; pageData.set(dataName, commitData);