Skip to content

Instantly share code, notes, and snippets.

@a2f0
Created September 13, 2014 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a2f0/5d8309046e5ec1ae55dd to your computer and use it in GitHub Desktop.
Save a2f0/5d8309046e5ec1ae55dd to your computer and use it in GitHub Desktop.
javascript star code
<script>//<![CDATA[
window.addEventListener("load", configRainbow, false);
function configRainbow() {
var x=document.getElementById("rainy");
var bigstar;
if (x.contentDocument) {
var star1 = x.contentDocument.getElementById("star1");
var star2 = x.contentDocument.getElementById("star2");
var star3 = x.contentDocument.getElementById("star3");
var star4 = x.contentDocument.getElementById("star4");
//star1.setAttribute("stroke", "lime");
//star2.setAttribute("stroke", "magenta");
//star3.setAttribute("stroke", "aqua");
//star4.setAttribute("stroke", "yellow");
star1.setAttribute("stroke", "black");
star2.setAttribute("stroke", "black");
star3.setAttribute("stroke", "black");
star4.setAttribute("stroke", "black");
star1.setAttribute("fill", "#000000");
star2.setAttribute("fill", "#333333");
star3.setAttribute("fill", "#666666");
star4.setAttribute("fill", "#b3b3b3");
rainy.style.visibility = "visible";
console.log("Finished selecting");
}
return;
}
//]]>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment