Is this code harmless let me know plz and thx

Joined
Jul 24, 2017
Messages
1
Reaction score
0
var brightness = 1;
var secondsUntilChange = 5;
//edit this ^^

//Don't edit the stuff below

setInterval(function() {
var red = Math.random() * brightness;
var green = Math.random() * brightness;
var blue = Math.random() * brightness;


var divs = document.getElementsByTagName("div");
for(var i = 0; i < divs.length; i++){
if(window.getComputedStyle(divs)["background-color"].startsWith('rgb(')) {
var color = window.getComputedStyle(divs)["background-color"].replace('rgb(', '').replace(')', '').split(',');
if(typeof(divs.attributes["trueColor"]) == 'undefined')
divs.attributes["trueColor"] = color;
else
color = divs.attributes["trueColor"];
divs.style.backgroundColor = "rgb(" + Math.floor(parseInt(color[0]) * red) + ", " + Math.floor(parseInt(color[1]) * green) + ", " + Math.floor(parseInt(color[2]) * blue) + ")";
}
}
}, secondsUntilChange * 1000);
 
Joined
Apr 25, 2017
Messages
251
Reaction score
33
We have no idea what is the program about. Would you mind to spend some time to describe it ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top