Skip to content

Commit

Permalink
Make image selection more randomized.
Browse files Browse the repository at this point in the history
  • Loading branch information
mscavnicky committed Nov 7, 2015
1 parent 8b8f3a1 commit efede13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion content.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ function block() {

if (request.status === 200) {
var dayNumber = new Date().getTime() / (1000 * 60 * 60 * 24);
var html = request.responseText.replace(/{{imageId}}/g, Math.floor(dayNumber % 900));
var randomId = (99991 * Math.floor(dayNumber)) % 900;
var html = request.responseText.replace(/{{imageId}}/g, randomId);
document.all[0].innerHTML = html;
}

Expand Down

0 comments on commit efede13

Please sign in to comment.