function shuffleImages () {
var imgs = $('.hmpg-images, .hmpg-available-images').find('img');
var newImgContainer = $('
');
var newImgs = [];
var newImgKeys = {};
var i = 0;
while (newImgs.length < 3 && i < 100) {
i++; // sanity check counter
var N = newImgs.length;
var M = Math.floor(Math.random() * imgs.length);
var sSrc = $(imgs.get(M)).attr('src');
if (!(sSrc in newImgKeys)) {
newImgs[N] = $('
![]()
');
newImgs[N].attr({src: sSrc, height: '160px', width: 'auto'});
newImgContainer.append(newImgs[N]);
}
newImgKeys[sSrc] = true;
} /* while */
$('.hmpg-images').find('img').hide({
duration: 0 /*ms*/,
done: function () {
newImgContainer.find('img').each(function () {
$('.hmpg-images').append($(this));
});
}
});
}
jQuery(document).ready(function () {
shuffleImages();
} );
/*
FILE ARCHIVED ON 21:21:54 Apr 24, 2020 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 16:33:33 Apr 28, 2020.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/
/*
playback timings (ms):
CDXLines.iter: 10.805 (3)
RedisCDXSource: 286.963
PetaboxLoader3.resolve: 586.484 (3)
esindex: 0.016
LoadShardBlock: 1287.0 (3)
captures_list: 1588.091
load_resource: 588.86
PetaboxLoader3.datanode: 1196.992 (5)
exclusion.robots.policy: 0.158
exclusion.robots: 0.171
*/