SHOW:
|
|
- or go back to the newest paste.
| 1 | - | <!-- This Script is from http://unkwnxhackers.webs.com/ , Coded by: Kody CoDeZ--> |
| 1 | + | <!-- |
| 2 | Snowflakes on website CMS- Coded By Kody CoDeZ | |
| 3 | ||
| 4 | This Script is from http://unkwnxhackers.webs.com/ , Coded by: Kody CoDeZ--> | |
| 5 | <script> | |
| 6 | // Set the number of snowflakes (more than 30 - 40 not recommended) | |
| 7 | var snowmax=35 | |
| 8 | ||
| 9 | // Set the colors for the snow. Add as many colors as you like | |
| 10 | var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD")
| |
| 11 | ||
| 12 | // Set the fonts, that create the snowflakes. Add as many fonts as you like | |
| 13 | var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")
| |
| 14 | ||
| 15 | // Set the letter that creates your snowflake (recommended:*) | |
| 16 | var snowletter="*" | |
| 17 | ||
| 18 | // Set the speed of sinking (recommended values range from 0.3 to 2) | |
| 19 | var sinkspeed=0.6 | |
| 20 | ||
| 21 | // Set the maximal-size of your snowflaxes | |
| 22 | var snowmaxsize=22 | |
| 23 | ||
| 24 | // Set the minimal-size of your snowflaxes | |
| 25 | var snowminsize=8 | |
| 26 | ||
| 27 | // Set the snowing-zone | |
| 28 | // Set 1 for all-over-snowing, set 2 for left-side-snowing | |
| 29 | // Set 3 for center-snowing, set 4 for right-side-snowing | |
| 30 | var snowingzone=3 | |
| 31 | ||
| 32 | /////////////////////////////////////////////////////////////////////////// | |
| 33 | // CONFIGURATION ENDS HERE | |
| 34 | /////////////////////////////////////////////////////////////////////////// | |
| 35 | ||
| 36 | ||
| 37 | // Do not edit below this line | |
| 38 | var snow=new Array() | |
| 39 | var marginbottom | |
| 40 | var marginright | |
| 41 | var timer | |
| 42 | var i_snow=0 | |
| 43 | var x_mv=new Array(); | |
| 44 | var crds=new Array(); | |
| 45 | var lftrght=new Array(); | |
| 46 | var browserinfos=navigator.userAgent | |
| 47 | var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/) | |
| 48 | var ns6=document.getElementById&&!document.all | |
| 49 | var opera=browserinfos.match(/Opera/) | |
| 50 | var browserok=ie5||ns6||opera | |
| 51 | ||
| 52 | function randommaker(range) {
| |
| 53 | rand=Math.floor(range*Math.random()) | |
| 54 | return rand | |
| 55 | } | |
| 56 | ||
| 57 | function initsnow() {
| |
| 58 | if (ie5 || opera) {
| |
| 59 | marginbottom = document.body.clientHeight | |
| 60 | marginright = document.body.clientWidth | |
| 61 | } | |
| 62 | else if (ns6) {
| |
| 63 | marginbottom = window.innerHeight | |
| 64 | marginright = window.innerWidth | |
| 65 | } | |
| 66 | var snowsizerange=snowmaxsize-snowminsize | |
| 67 | for (i=0;i<=snowmax;i++) {
| |
| 68 | crds[i] = 0; | |
| 69 | lftrght[i] = Math.random()*15; | |
| 70 | x_mv[i] = 0.03 + Math.random()/10; | |
| 71 | snow[i]=document.getElementById("s"+i)
| |
| 72 | snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)] | |
| 73 | snow[i].size=randommaker(snowsizerange)+snowminsize | |
| 74 | snow[i].style.fontSize=snow[i].size | |
| 75 | snow[i].style.color=snowcolor[randommaker(snowcolor.length)] | |
| 76 | snow[i].sink=sinkspeed*snow[i].size/5 | |
| 77 | if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
| |
| 78 | if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
| |
| 79 | if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
| |
| 80 | if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
| |
| 81 | snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size) | |
| 82 | snow[i].style.left=snow[i].posx | |
| 83 | snow[i].style.top=snow[i].posy | |
| 84 | } | |
| 85 | movesnow() | |
| 86 | } | |
| 87 | ||
| 88 | function movesnow() {
| |
| 89 | for (i=0;i<=snowmax;i++) {
| |
| 90 | crds[i] += x_mv[i]; | |
| 91 | snow[i].posy+=snow[i].sink | |
| 92 | snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i]); | |
| 93 | snow[i].style.top=snow[i].posy | |
| 94 | ||
| 95 | if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
| |
| 96 | if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
| |
| 97 | if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
| |
| 98 | if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
| |
| 99 | if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
| |
| 100 | snow[i].posy=0 | |
| 101 | } | |
| 102 | } | |
| 103 | var timer=setTimeout("movesnow()",50)
| |
| 104 | } | |
| 105 | ||
| 106 | for (i=0;i<=snowmax;i++) {
| |
| 107 | document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
| |
| 108 | } | |
| 109 | if (browserok) {
| |
| 110 | window.onload=initsnow | |
| 111 | } | |
| 112 | </script> | |
| 113 | ||
| 114 | <font face="Tahoma"><a target="_blank" href="http://unkwnxhackers.webs.com/"><span style="font-size: 8pt; text-decoration: none">HTML Free Code</span></a></font> |