/*
* @title random background image
* @description
* @include http://*
* @license MIT License
*/
setInterval(function(style, canvas){
canvas.setAttribute("width", 10);
canvas.setAttribute("height", 10);
var context = canvas.getContext("2d");
for(var y = 0; y < 10; y++) for(var x = 0; x < 10; x++){
context.fillStyle = "rgb(" + [
(Math.random() * 255) >> 0,
(Math.random() * 255) >> 0,
(Math.random() * 255) >> 0
] + ")";
context.fillRect(x, y, x + 1, y + 1);
}
style.backgroundPosition = "repeat";
style.backgroundImage = "url('" + canvas.toDataURL() + "')";
}, 1000, document.body.style, document.createElement("canvas"));