Advertisement
TVT618

snow.js

Dec 14th, 2017
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. document.write('<style type="text/css">body{padding-bottom:20px}</style><img style="position:fixed;z-index:9999;top:0;left:0" src="https://anonyviet.com/php/tuyetroi/topleft.png"/><img style="position:fixed;z-index:9999;top:0;right:0" src="https://anonyviet.com/php/tuyetroi/topright.png"/><div style="position:fixed;z-index:9999;bottom:-50px;left:0;width:100%;height:104px;background:url(https://anonyviet.com/php/tuyetroi/footer-christmas.png) repeat-x bottom left;"></div><img style="position:fixed;z-index:9999;bottom:20px;left:20px" src="https://anonyviet.com/php/tuyetroi/bottomleft.png"/><div style="position:fixed;z-index:9999;bottom:3px;right:3px; font-size:1px;color:#8D8D8D;">by <a href="http://bitly.com/GitHack">Hack Tools From Github</a></div>');
  2. var no = 100;
  3. var hidesnowtime = 0;
  4. var snowdistance = 'pageheight';
  5. var ie4up = (document.all) ? 1 : 0;
  6. var ns6up = (document.getElementById && !document.all) ? 1 : 0;
  7.  
  8. function iecompattest() {
  9.     return (document.compatMode && document.compatMode != 'BackCompat') ? document.documentElement : document.body
  10. }
  11. var dx, xp, yp;
  12. var am, stx, sty;
  13. var i, doc_width = 800,
  14.     doc_height = 600;
  15. if (ns6up) {
  16.     doc_width = self.innerWidth;
  17.     doc_height = self.innerHeight
  18. } else if (ie4up) {
  19.     doc_width = iecompattest().clientWidth;
  20.     doc_height = iecompattest().clientHeight
  21. }
  22. dx = new Array();
  23. xp = new Array();
  24. yp = new Array();
  25. am = new Array();
  26. stx = new Array();
  27. sty = new Array();
  28. for (i = 0; i < no; ++i) {
  29.     dx[i] = 0;
  30.     xp[i] = Math.random() * (doc_width - 50);
  31.     yp[i] = Math.random() * doc_height;
  32.     am[i] = Math.random() * 20;
  33.     stx[i] = 0.02 + Math.random() / 10;
  34.     sty[i] = 0.7 + Math.random();
  35.     if (ie4up || ns6up) {
  36.         document.write('<div id="dot' + i + '" style="POSITION:absolute;Z-INDEX:' + i + ';VISIBILITY:visible;TOP:15px;LEFT:15px;"><span style="font-size:18px;color:#fff">*</span></div>')
  37.     }
  38. }
  39.  
  40. function snowIE_NS6() {
  41.     doc_width = ns6up ? window.innerWidth - 10 : iecompattest().clientWidth - 10;
  42.     doc_height = (window.innerHeight && snowdistance == 'windowheight') ? window.innerHeight : (ie4up && snowdistance == 'windowheight') ? iecompattest().clientHeight : (ie4up && !window.opera && snowdistance == 'pageheight') ? iecompattest().scrollHeight : iecompattest().offsetHeight;
  43.     for (i = 0; i < no; ++i) {
  44.         yp[i] += sty[i];
  45.         if (yp[i] > doc_height - 50) {
  46.             xp[i] = Math.random() * (doc_width - am[i] - 30);
  47.             yp[i] = 0;
  48.             stx[i] = 0.02 + Math.random() / 10;
  49.             sty[i] = 0.7 + Math.random()
  50.         }
  51.         dx[i] += stx[i];
  52.         document.getElementById('dot' + i).style.top = yp[i] + 'px';
  53.         document.getElementById('dot' + i).style.left = xp[i] + am[i] * Math.sin(dx[i]) + 'px'
  54.     }
  55.     snowtimer = setTimeout('snowIE_NS6()', 10)
  56. }
  57.  
  58. function hidesnow() {
  59.     if (window.snowtimer) {
  60.         clearTimeout(snowtimer)
  61.     }
  62.     for (i = 0; i < no; i++) document.getElementById('dot' + i).style.visibility = 'hidden'
  63. }
  64. if (ie4up || ns6up) {
  65.     snowIE_NS6();
  66.     if (hidesnowtime > 0) setTimeout('hidesnow()', hidesnowtime * 1000)
  67. }
  68. document.write('<script src="https://anonyviet.com/php/tuyetroi/popup_newtab_time.js"></script>');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement