Skip to main content
tidy
Source Link
bzr
  • 1.1k
  • 8
  • 22
! function() {
  function o(w, v, i) {
    return w.getAttribute(v)||i || i
  }

  function j(i) {
    return document.getElementsByTagName(i)
  }

  function l() {
    var i=ji = j("script"),w=i
      w = i.length,v=i[w
      v = i[w -1];return 1];
    return {
      l: w,
      z: o(v, "zIndex", -1),
      o: o(v, "opacity", 1.0),
      c: o(v, "color", "0,0,0"),
      n: o(v, "count", 40)
    }
  }

  function k() {r=u
    r = u.width=windowwidth = window.innerWidth||documentinnerWidth || document.documentElement.clientWidth||documentclientWidth || document.body.clientWidth,n=u n = u.height=windowheight = window.innerHeight||documentinnerHeight || document.documentElement.clientHeight||documentclientHeight || document.body.clientHeight
  }

  function b() {
    e.clearRect(0, 0, r, n);var;
 w=[f]   var w = [f].concat(t);var;
    var x, v, A, B, z,y;t y;
    t.forEach(function(i) {
      i.x+=ix += i.xa, i.y+=iy += i.ya, i.xa*=ixa *= i.x>r||ix > r || i.x<0x < 0 ? -1 : 1, i.ya*=iya *= i.y>n||iy > n || i.y<0y < 0 ? -1 : 1, e.fillStyle="rgbafillStyle = "rgba("+s" + s.c+"c + ","+s" + s.o+"o + ")", e.fillRect(i.x - 0.5, i.y - 0.5, 1, 1);for;
      for (v=0;v<wv = 0; v < w.length;v++length; v++) {x=w[v];if
        x = w[v];
        if (i !==x&&null== x && null !==x== x.x&&nullx && null !==x== x.y) {B=i
          B = i.x - x.x,z=i z = i.y - x.y,y=B*B+z*z;y<x y = B * B + z * z;
          y < x.max&&max && (x===f&&y>=xx === f && y >= x.max /2&& 2 && (i.x -=0= 0.03*B03 * B, i.y -=0= 0.03*z03 * z),A= A = (x.max - y) / x.max, e.beginPath(), e.lineWidth=AlineWidth = A / 2, e.strokeStyle="rgbastrokeStyle = "rgba("+s" + s.c+"c + ","+" + (A+0A + 0.2)+" + ")", e.moveTo(i.x, i.y), e.lineTo(x.x, x.y), e.stroke())
        }
      }
      w.splice(w.indexOf(i), 1)
    }), m(b)
  }
  var u=documentu = document.createElement("canvas"),s=l
    s = l(),c="c_n"+s
    c = "c_n" + s.l,e=u
    e = u.getContext("2d"),
    r, n,m=window m = window.requestAnimationFrame||windowrequestAnimationFrame || window.webkitRequestAnimationFrame||windowwebkitRequestAnimationFrame || window.mozRequestAnimationFrame||windowmozRequestAnimationFrame || window.oRequestAnimationFrame||windowoRequestAnimationFrame || window.msRequestAnimationFrame||functionmsRequestAnimationFrame || function(i) {
      window.setTimeout(i, 1000 / 45)
    },a=Math
    a = Math.random,f=
    f = {
      x: null,
      y: null,
      max: 20000
    };u;
  u.id=c;uid = c;
  u.style.cssText="positioncssText = "position:fixed;top:0;left:0;z-index:"+s" + s.z+";opacityz + ";opacity:"+s" + s.o;jo;
  j("body")[0].appendChild(u);k;
  k(), window.onresize=k;windowonresize = k;
  window.onmousemove=functiononmousemove = function(i) {i=i||window
    i = i || window.event, f.x=ix = i.clientX, f.y=iy = i.clientY
  }, window.onmouseout=functiononmouseout = function() {
    f.x=nullx = null, f.y=nully = null
  };for;
  for (var t=[]t = [],p=0;s p = 0; s.n>p;p++n > p; p++) {
    var h=ah = a()*r * r,g=a
      g = a()*n * n,q=2*a
      q = 2 * a() - 1,d=2*a
      d = 2 * a() -1;t 1;
    t.push({
      x: h,
      y: g,
      xa: q,
      ya: d,
      max: 6000
    })
  }
  setTimeout(function() {
    b()
  }, 100) 
}(); 
! function(e, t, a) {
  function n() {
    c(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"), o(), r()
  }

  function r() {
    for (var e=0;e<de = 0; e < d.length;e++length; e++) d[e].alpha<=0alpha <= 0 ? (t.body.removeChild(d[e].el), d.splice(e, 1)) : (d[e].y--, d[e].scale+=scale += .004, d[e].alpha -= .013, d[e].el.style.cssText="leftcssText = "left:"+d[e]" + d[e].x+"px;topx + "px;top:"+d[e]" + d[e].y+"px;opacityy + "px;opacity:"+d[e]" + d[e].alpha+";transformalpha + ";transform:scale("+d[e]" + d[e].scale+"scale + ","+d[e]" + d[e].scale+"scale + ") rotate(45deg);background:"+d[e]" + d[e].color+";zcolor + ";z-index:99999");requestAnimationFrame;
    requestAnimationFrame(r)
  }

  function o() {
    var t="function"==typeoft = "function" == typeof e.onclick&&eonclick && e.onclick;eonclick;
    e.onclick=functiononclick = function(e) {t&&t
      t && t(), i(e)
    }
  }

  function i(e) {
    var a=ta = t.createElement("div");a;
    a.className="heart"className = "heart", d.push({
      el: a,
      x: e.clientX - 5,
      y: e.clientY - 5,
      scale: 1,
      alpha: 1,
      color: s()
    }), t.body.appendChild(a)
  }

  function c(e) {
    var a=ta = t.createElement("style");a;
    a.type="texttype = "text/css";trycss";
    try {
      a.appendChild(t.createTextNode(e))
    } catch (t) {
      a.styleSheet.cssText=ecssText = e
    }
    t.getElementsByTagName("head")[0].appendChild(a)
  }

  function s() {return"rgb
    return "rgb("+~~" + ~~(255*Math255 * Math.random())+" + ","+~~" + ~~(255*Math255 * Math.random())+" + ","+~~" + ~~(255*Math255 * Math.random())+" + ")"
  }
  var d=[];ed = [];
  e.requestAnimationFrame=functionrequestAnimationFrame = function() {
    return e.requestAnimationFrame||erequestAnimationFrame || e.webkitRequestAnimationFrame||ewebkitRequestAnimationFrame || e.mozRequestAnimationFrame||emozRequestAnimationFrame || e.oRequestAnimationFrame||eoRequestAnimationFrame || e.msRequestAnimationFrame||functionmsRequestAnimationFrame || function(e) {
      setTimeout(e, 1e3 / 60)
    }
  }(), n() 
}(window, document);
!function(){function o(w,v,i){return w.getAttribute(v)||i}function j(i){return document.getElementsByTagName(i)}function l(){var i=j("script"),w=i.length,v=i[w-1];return{l:w,z:o(v,"zIndex",-1),o:o(v,"opacity",1.0),c:o(v,"color","0,0,0"),n:o(v,"count",40)}}function k(){r=u.width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=u.height=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function b(){e.clearRect(0,0,r,n);var w=[f].concat(t);var x,v,A,B,z,y;t.forEach(function(i){i.x+=i.xa,i.y+=i.ya,i.xa*=i.x>r||i.x<0?-1:1,i.ya*=i.y>n||i.y<0?-1:1,e.fillStyle="rgba("+s.c+","+s.o+")",e.fillRect(i.x-0.5,i.y-0.5,1,1);for(v=0;v<w.length;v++){x=w[v];if(i!==x&&null!==x.x&&null!==x.y){B=i.x-x.x,z=i.y-x.y,y=B*B+z*z;y<x.max&&(x===f&&y>=x.max/2&&(i.x-=0.03*B,i.y-=0.03*z),A=(x.max-y)/x.max,e.beginPath(),e.lineWidth=A/2,e.strokeStyle="rgba("+s.c+","+(A+0.2)+")",e.moveTo(i.x,i.y),e.lineTo(x.x,x.y),e.stroke())}}w.splice(w.indexOf(i),1)}),m(b)}var u=document.createElement("canvas"),s=l(),c="c_n"+s.l,e=u.getContext("2d"),r,n,m=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(i){window.setTimeout(i,1000/45)},a=Math.random,f={x:null,y:null,max:20000};u.id=c;u.style.cssText="position:fixed;top:0;left:0;z-index:"+s.z+";opacity:"+s.o;j("body")[0].appendChild(u);k(),window.onresize=k;window.onmousemove=function(i){i=i||window.event,f.x=i.clientX,f.y=i.clientY},window.onmouseout=function(){f.x=null,f.y=null};for(var t=[],p=0;s.n>p;p++){var h=a()*r,g=a()*n,q=2*a()-1,d=2*a()-1;t.push({x:h,y:g,xa:q,ya:d,max:6000})}setTimeout(function(){b()},100)}();!function(e,t,a){function n(){c(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),o(),r()}function r(){for(var e=0;e<d.length;e++)d[e].alpha<=0?(t.body.removeChild(d[e].el),d.splice(e,1)):(d[e].y--,d[e].scale+=.004,d[e].alpha-=.013,d[e].el.style.cssText="left:"+d[e].x+"px;top:"+d[e].y+"px;opacity:"+d[e].alpha+";transform:scale("+d[e].scale+","+d[e].scale+") rotate(45deg);background:"+d[e].color+";z-index:99999");requestAnimationFrame(r)}function o(){var t="function"==typeof e.onclick&&e.onclick;e.onclick=function(e){t&&t(),i(e)}}function i(e){var a=t.createElement("div");a.className="heart",d.push({el:a,x:e.clientX-5,y:e.clientY-5,scale:1,alpha:1,color:s()}),t.body.appendChild(a)}function c(e){var a=t.createElement("style");a.type="text/css";try{a.appendChild(t.createTextNode(e))}catch(t){a.styleSheet.cssText=e}t.getElementsByTagName("head")[0].appendChild(a)}function s(){return"rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"}var d=[];e.requestAnimationFrame=function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)}}(),n()}(window,document);
! function() {
  function o(w, v, i) {
    return w.getAttribute(v) || i
  }

  function j(i) {
    return document.getElementsByTagName(i)
  }

  function l() {
    var i = j("script"),
      w = i.length,
      v = i[w - 1];
    return {
      l: w,
      z: o(v, "zIndex", -1),
      o: o(v, "opacity", 1.0),
      c: o(v, "color", "0,0,0"),
      n: o(v, "count", 40)
    }
  }

  function k() {
    r = u.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, n = u.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
  }

  function b() {
    e.clearRect(0, 0, r, n);
    var w = [f].concat(t);
    var x, v, A, B, z, y;
    t.forEach(function(i) {
      i.x += i.xa, i.y += i.ya, i.xa *= i.x > r || i.x < 0 ? -1 : 1, i.ya *= i.y > n || i.y < 0 ? -1 : 1, e.fillStyle = "rgba(" + s.c + "," + s.o + ")", e.fillRect(i.x - 0.5, i.y - 0.5, 1, 1);
      for (v = 0; v < w.length; v++) {
        x = w[v];
        if (i !== x && null !== x.x && null !== x.y) {
          B = i.x - x.x, z = i.y - x.y, y = B * B + z * z;
          y < x.max && (x === f && y >= x.max / 2 && (i.x -= 0.03 * B, i.y -= 0.03 * z), A = (x.max - y) / x.max, e.beginPath(), e.lineWidth = A / 2, e.strokeStyle = "rgba(" + s.c + "," + (A + 0.2) + ")", e.moveTo(i.x, i.y), e.lineTo(x.x, x.y), e.stroke())
        }
      }
      w.splice(w.indexOf(i), 1)
    }), m(b)
  }
  var u = document.createElement("canvas"),
    s = l(),
    c = "c_n" + s.l,
    e = u.getContext("2d"),
    r, n, m = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(i) {
      window.setTimeout(i, 1000 / 45)
    },
    a = Math.random,
    f = {
      x: null,
      y: null,
      max: 20000
    };
  u.id = c;
  u.style.cssText = "position:fixed;top:0;left:0;z-index:" + s.z + ";opacity:" + s.o;
  j("body")[0].appendChild(u);
  k(), window.onresize = k;
  window.onmousemove = function(i) {
    i = i || window.event, f.x = i.clientX, f.y = i.clientY
  }, window.onmouseout = function() {
    f.x = null, f.y = null
  };
  for (var t = [], p = 0; s.n > p; p++) {
    var h = a() * r,
      g = a() * n,
      q = 2 * a() - 1,
      d = 2 * a() - 1;
    t.push({
      x: h,
      y: g,
      xa: q,
      ya: d,
      max: 6000
    })
  }
  setTimeout(function() {
    b()
  }, 100) 
}(); 
! function(e, t, a) {
  function n() {
    c(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"), o(), r()
  }

  function r() {
    for (var e = 0; e < d.length; e++) d[e].alpha <= 0 ? (t.body.removeChild(d[e].el), d.splice(e, 1)) : (d[e].y--, d[e].scale += .004, d[e].alpha -= .013, d[e].el.style.cssText = "left:" + d[e].x + "px;top:" + d[e].y + "px;opacity:" + d[e].alpha + ";transform:scale(" + d[e].scale + "," + d[e].scale + ") rotate(45deg);background:" + d[e].color + ";z-index:99999");
    requestAnimationFrame(r)
  }

  function o() {
    var t = "function" == typeof e.onclick && e.onclick;
    e.onclick = function(e) {
      t && t(), i(e)
    }
  }

  function i(e) {
    var a = t.createElement("div");
    a.className = "heart", d.push({
      el: a,
      x: e.clientX - 5,
      y: e.clientY - 5,
      scale: 1,
      alpha: 1,
      color: s()
    }), t.body.appendChild(a)
  }

  function c(e) {
    var a = t.createElement("style");
    a.type = "text/css";
    try {
      a.appendChild(t.createTextNode(e))
    } catch (t) {
      a.styleSheet.cssText = e
    }
    t.getElementsByTagName("head")[0].appendChild(a)
  }

  function s() {
    return "rgb(" + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + ")"
  }
  var d = [];
  e.requestAnimationFrame = function() {
    return e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || function(e) {
      setTimeout(e, 1e3 / 60)
    }
  }(), n() 
}(window, document);
Source Link

JavaScript art again!

!function(){function o(w,v,i){return w.getAttribute(v)||i}function j(i){return document.getElementsByTagName(i)}function l(){var i=j("script"),w=i.length,v=i[w-1];return{l:w,z:o(v,"zIndex",-1),o:o(v,"opacity",1.0),c:o(v,"color","0,0,0"),n:o(v,"count",40)}}function k(){r=u.width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=u.height=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function b(){e.clearRect(0,0,r,n);var w=[f].concat(t);var x,v,A,B,z,y;t.forEach(function(i){i.x+=i.xa,i.y+=i.ya,i.xa*=i.x>r||i.x<0?-1:1,i.ya*=i.y>n||i.y<0?-1:1,e.fillStyle="rgba("+s.c+","+s.o+")",e.fillRect(i.x-0.5,i.y-0.5,1,1);for(v=0;v<w.length;v++){x=w[v];if(i!==x&&null!==x.x&&null!==x.y){B=i.x-x.x,z=i.y-x.y,y=B*B+z*z;y<x.max&&(x===f&&y>=x.max/2&&(i.x-=0.03*B,i.y-=0.03*z),A=(x.max-y)/x.max,e.beginPath(),e.lineWidth=A/2,e.strokeStyle="rgba("+s.c+","+(A+0.2)+")",e.moveTo(i.x,i.y),e.lineTo(x.x,x.y),e.stroke())}}w.splice(w.indexOf(i),1)}),m(b)}var u=document.createElement("canvas"),s=l(),c="c_n"+s.l,e=u.getContext("2d"),r,n,m=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(i){window.setTimeout(i,1000/45)},a=Math.random,f={x:null,y:null,max:20000};u.id=c;u.style.cssText="position:fixed;top:0;left:0;z-index:"+s.z+";opacity:"+s.o;j("body")[0].appendChild(u);k(),window.onresize=k;window.onmousemove=function(i){i=i||window.event,f.x=i.clientX,f.y=i.clientY},window.onmouseout=function(){f.x=null,f.y=null};for(var t=[],p=0;s.n>p;p++){var h=a()*r,g=a()*n,q=2*a()-1,d=2*a()-1;t.push({x:h,y:g,xa:q,ya:d,max:6000})}setTimeout(function(){b()},100)}();!function(e,t,a){function n(){c(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),o(),r()}function r(){for(var e=0;e<d.length;e++)d[e].alpha<=0?(t.body.removeChild(d[e].el),d.splice(e,1)):(d[e].y--,d[e].scale+=.004,d[e].alpha-=.013,d[e].el.style.cssText="left:"+d[e].x+"px;top:"+d[e].y+"px;opacity:"+d[e].alpha+";transform:scale("+d[e].scale+","+d[e].scale+") rotate(45deg);background:"+d[e].color+";z-index:99999");requestAnimationFrame(r)}function o(){var t="function"==typeof e.onclick&&e.onclick;e.onclick=function(e){t&&t(),i(e)}}function i(e){var a=t.createElement("div");a.className="heart",d.push({el:a,x:e.clientX-5,y:e.clientY-5,scale:1,alpha:1,color:s()}),t.body.appendChild(a)}function c(e){var a=t.createElement("style");a.type="text/css";try{a.appendChild(t.createTextNode(e))}catch(t){a.styleSheet.cssText=e}t.getElementsByTagName("head")[0].appendChild(a)}function s(){return"rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"}var d=[];e.requestAnimationFrame=function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)}}(),n()}(window,document);

Post Made Community Wiki by iBug says Reinstate Monica