File tree Expand file tree Collapse file tree 1 file changed +1
-22
lines changed
demos/credential-management Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -153,26 +153,5 @@ document.querySelector('form').addEventListener('submit', function (e) {
153
153
} ) ;
154
154
155
155
function getFace ( string ) {
156
- var hashString = function ( ) {
157
- var hash = 0 , i , chr , len ;
158
- if ( string . length == 0 ) return hash ;
159
- for ( i = 0 , len = string . length ; i < len ; i ++ ) {
160
- chr = string . charCodeAt ( i ) ;
161
- hash = ( ( hash << 5 ) - hash ) + chr ;
162
- hash |= 0 ; // Convert to 32bit integer
163
- }
164
- return hash ;
165
- } ;
166
-
167
- // Faces from uifaces.com. Thanks!
168
- var faces = [
169
- "https://s3.amazonaws.com/uifaces/faces/twitter/jsa/128.jpg" ,
170
- "https://s3.amazonaws.com/uifaces/faces/twitter/sauro/128.jpg" ,
171
- "https://s3.amazonaws.com/uifaces/faces/twitter/brad_frost/128.jpg" ,
172
- "https://s3.amazonaws.com/uifaces/faces/twitter/rem/128.jpg" ,
173
- "https://s3.amazonaws.com/uifaces/faces/twitter/pixeliris/128.jpg" ,
174
- "https://s3.amazonaws.com/uifaces/faces/twitter/csswizardry/128.jpg" ,
175
- ] ;
176
-
177
- return faces [ hashString ( string ) % faces . length ] ;
156
+ return "https://robohash.org/" + string + "?set=set3" ;
178
157
}
You can’t perform that action at this time.
0 commit comments