Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed issue #22

  • Loading branch information...
commit 6657a2defbda4f4f2d3c3a9ca2f598b7bef29f24 1 parent d60e989
@DanielRapp authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 jquery/jquery.noisy.min.js
View
6 jquery/jquery.noisy.min.js
@@ -1,3 +1,3 @@
-(function(c){c.fn.noisy=function(b){var b=c.extend({},c.fn.noisy.defaults,b),d,h,a=!1;try{h=!0,a=localStorage.getItem(window.JSON.stringify(b))}catch(l){h=!1}if(a)d=a;else{a=document.createElement("canvas");if(a.getContext){a.width=a.height=b.size;for(var i=a.getContext("2d"),e=i.createImageData(a.width,a.height),j=b.intensity*Math.pow(b.size,2),k=255*b.opacity;j--;){var f=~~(Math.random()*a.width),g=~~(Math.random()*a.height),f=4*(f+g*e.width),g=j%255;e.data[f]=g;e.data[f+1]=b.monochrome?g:~~(255*
-Math.random());e.data[f+2]=b.monochrome?g:~~(255*Math.random());e.data[f+3]=~~(Math.random()*k)}i.putImageData(e,0,0);d=a.toDataURL("image/png");if(0!=d.indexOf("data:image/png")||c.browser.msie&&9>c.browser.version.substr(0,1)&&32768<d.length)d=b.fallback}else d=b.fallback;window.JSON&&h&&localStorage.setItem(window.JSON.stringify(b),d)}return this.each(function(){c(this).css("background-image","url('"+d+"'),"+c(this).css("background-image"))})};c.fn.noisy.defaults={intensity:0.9,size:200,opacity:0.08,
-fallback:"",monochrome:!1}})(jQuery);
+(function(c){c.fn.noisy=function(b){var b=c.extend({},c.fn.noisy.defaults,b),d,h,a=!1;try{h=!0,a=localStorage.getItem(window.JSON.stringify(b))}catch(l){h=!1}if(a)d=a;else{a=document.createElement("canvas");if(a.getContext){a.width=a.height=b.size;for(var i=a.getContext("2d"),e=i.createImageData(a.width,a.height),j=Math.round(b.intensity*Math.pow(b.size,2)),k=255*b.opacity;j--;){var f=~~(Math.random()*a.width),g=~~(Math.random()*a.height),f=4*(f+g*e.width),g=j%255;e.data[f]=g;e.data[f+1]=b.monochrome?
+g:~~(255*Math.random());e.data[f+2]=b.monochrome?g:~~(255*Math.random());e.data[f+3]=~~(Math.random()*k)}i.putImageData(e,0,0);d=a.toDataURL("image/png");if(0!=d.indexOf("data:image/png")||c.browser.msie&&9>c.browser.version.substr(0,1)&&32768<d.length)d=b.fallback}else d=b.fallback;window.JSON&&h&&localStorage.setItem(window.JSON.stringify(b),d)}return this.each(function(){c(this).css("background-image","url('"+d+"'),"+c(this).css("background-image"))})};c.fn.noisy.defaults={intensity:0.9,size:200,
+opacity:0.08,fallback:"",monochrome:!1}})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.