diff --git a/isso/js/app/isso.js b/isso/js/app/isso.js index 6d44cb0..877c692 100644 --- a/isso/js/app/isso.js +++ b/isso/js/app/isso.js @@ -11,8 +11,7 @@ define(["behave", "app/text/html", "app/dom", "app/utils", "app/api", "app/marku var el = $.htmlify(Mark.up(templates["postbox"])); - // add a blank identicon to not waste CPU cycles - // XXX show a space invader instead :> + // add a default identicon to not waste CPU cycles $(".avatar > canvas", el).replace(lib.identicons.blank(48, 48)); // on text area focus, generate identicon from IP address diff --git a/isso/js/app/lib/identicons.js b/isso/js/app/lib/identicons.js index 118f04c..5ab0423 100644 --- a/isso/js/app/lib/identicons.js +++ b/isso/js/app/lib/identicons.js @@ -108,8 +108,16 @@ define(["q"], function(Q) { }; var generateBlank = function(height, width) { - var el = generateIdenticon(null, height, width); + + var blank = parseInt([ + 0, 1, 1, 1, 1, + 1, 0, 1, 1, 0, + 1, 1, 1, 1, 1, /* purple: */ 0, 1, 0 + ].join(""), 2).toString(16); + + var el = generateIdenticon(blank, height, width); el.className = "blank"; + return el; };