Skip to content

Instantly share code, notes, and snippets.

View geta6's full-sized avatar

geta6 geta6

View GitHub Profile
@Gab-km
Gab-km / github-flow.ja.md
Last active March 21, 2025 03:38 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@geta6
geta6 / moshroom.js
Created May 17, 2012 17:04
卑猥なGoogleロゴをモザイクにします Firefoxの場合はアドレスバーでなくブックマーク登録からご利用ください
javascript:(function(){var g=function(c){return document.getElementById(c?"hplogo":"lga")},g={i:g(0),d:g(1),w:g(1).naturalWidth,h:g(1).naturalHeight},d=document.createElement("canvas"),o=d.getContext("2d"),a=g.i.querySelector("a"),e=5;d.setAttribute("width",g.w+"px");d.setAttribute("height",g.h+"px");d.setAttribute("style",g.d.getAttribute("style"));o.drawImage(g.d,0,0);a.innerHTML="";a.appendChild(d);for(var k=0;k<g.h;k+=e){var f=(e<=g.h-k)?e:g.h-k;for(var l=0;l<g.w;l+=e){var m=(e<=g.w-l)?e:g.w-l,b=[0,0,0],n=o.getImageData(l,k,m,f).data;for(var j=0;j<n.length;j+=4){b[0]+=n[j];b[1]+=n[j+1];b[2]+=n[j+2]}var i=n.length/4;b[0]=Math.floor(b[0]/i);b[1]=Math.floor(b[1]/i);b[2]=Math.floor(b[2]/i);o.clearRect(l,k,m,f);o.fillStyle="rgb("+b.join(",")+")";o.fillRect(l,k,m,f)}}}());