replace blank identicon with ghosts
This commit is contained in:
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"]));
|
var el = $.htmlify(Mark.up(templates["postbox"]));
|
||||||
|
|
||||||
// add a blank identicon to not waste CPU cycles
|
// add a default identicon to not waste CPU cycles
|
||||||
// XXX show a space invader instead :>
|
|
||||||
$(".avatar > canvas", el).replace(lib.identicons.blank(48, 48));
|
$(".avatar > canvas", el).replace(lib.identicons.blank(48, 48));
|
||||||
|
|
||||||
// on text area focus, generate identicon from IP address
|
// on text area focus, generate identicon from IP address
|
||||||
|
@ -108,8 +108,16 @@ define(["q"], function(Q) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var generateBlank = function(height, width) {
|
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";
|
el.className = "blank";
|
||||||
|
|
||||||
return el;
|
return el;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user