replace blank identicon with ghosts

pull/16/head
Martin Zimmermann 11 years ago
parent e58a16546b
commit 988d2032c5

@ -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

@ -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;
};

Loading…
Cancel
Save