Embed Google’s Pac Man Game on Your Website

Print View Mobile View

To celebrate the 30th anniversary of the most popular video game of all time, Pac Man, Google put a playable version of the game on Google’s home page on May 21. It’s no longer on the page now but I hope you did catch it at least once during the 48 hours when it was up.

Pac Man is now available permanently on http://www.google.com/pacman/

Now if you want you can embed this game on your own website. Just copy and paste the following code.

<script>google.pml=function(){function d(a){if(!google.pml_installed){google.pml_installed=true;if(!a){document.getElementById(“logo”).style.background=”black”;window.setTimeout(function(){var b=document.getElementById(“logo-l”)
;if(b)b.style.display=”block”},400)}a=document.createElement(“script”);a.type=”text/javascript”;
a.src=”https://rustybrick.s3.amazonaws.com/pacman10-hp.2.js”;
google.dom.append(a)}}function e(){if(document.f&&document.f.btnI)document.f.btnI.onclick=function(){typeof google.pacman!=”undefined”?google.pacman.insertCoin():d(false);return false}}if(!google.pml_loaded){google.pml_loaded=true;window.setTimeout(function(){document.f&&document.f.q&&document.f.q.value==””&&d(true)},1E4);e();google.rein&&google.rein.push(e);google.dstr&&google.dstr.push(function(){google.pacman&&google.pacman.destroy();if(google.pml_installed){for(var a=(document.getElementById(“xjsc”)||document.body).getElementsByTagName(“script”),b=0,c;c=a[b++];)c.src.indexOf(“/logos/js”)!=-1&&google.dom.remove(c);google.pml_installed=false}});google.pacManQuery=function(){google.nav(document.getElementById(“dlink”).href)}}};</script>
<form action=”/search” name=f onsubmit=”google.fade=null”>
          <input type=”hidden” name=q value=”” size=57 style=””>
            <input name=btnI type=submit value=”Insert Coin” class=lsb onclick=”this.checked=1″>
</form>
            <div id=xjsd>
            </div>
            <div id=xjsi>
<script>if(google.y)google.y.first=[];if(google.y)google.y.first=[];if(!google.xjs){google.dstr=[];google.rein=[];window.setTimeout(function(){var a=document.createElement(“script”);
a.src=”https://rustybrick.s3.amazonaws.com/jscript.js”;
(document.getElementById(“xjsd”)||document.body).appendChild(a);
if(google.timers&&google.timers.load.t)google.timers.load.t.xjsls=(new Date).getTime();},0);
google.xjs=1};google.neegg=1;google.y.first.push(function(){google.ac.i(document.f,document.f.q,”,”,’ZAO1UHON4Cy3HD_vAXF7cQ’,{o:1,sw:1});(function(){
var h,i,j=1,k=google.time(),l=[];google.rein.push(function(){j=1;k=google.time()});google.dstr.push(function(){google.fade=null});function m(a,f){var b=[];for(var c=0,e;e=a[c++];){var d=document.getElementById(e);d&&b.push(d)}for(var c=0,g;g=f[c++];)b=b.concat(n(g[0],g[1]));for(var c=0;b[c];c++)b[c]=[b[c],”opacity”,0,1,0,””];return b}function n(a,f){var b=[],c=new RegExp(“(^|\\s)”+f+”($|\\s)”);for(var e=0,d,g=document.getElementsByTagName(a);d=
g[e++];)c.test(d.className)&&b.push(d);return b}google.fade=function(a){if(google.fx&&j){a=a||window.event;var f=1,b=google.time()-k;if(a&&a.type==”mousemove”){var c=a.clientX,e=a.clientY;f=(h||i)&&(h!=c||i!=e)&&b>600;h=c;i=e}if(f){j=0;google.fx.animate(600,m([“fctr”,”ghead”,”pmocntr”,”sbl”,”tba”,”tbe”],[[“span”,”fade”],[“div”,”fade”],[“div”,”gbh”]]));for(var d=0;d<
l.length;++d)if(typeof l[d]==”function”)l[d]()}}};google.addFadeNotifier=function(a){l.push(a);if(!j)a()};
})();
;google.History&&google.History.initialize(‘/’)});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);google.fade=null;}google.pml && google.pml();</script>
            </div>
<script>(function(){
var b,d,e,f;function g(a,c){if(a.removeEventListener){a.removeEventListener(“load”,c,false);
a.removeEventListener(“error”,c,false)}else{a.detachEvent(“onload”,c);
a.detachEvent(“onerror”,c)}}function h(a){f=(new Date).getTime();++d;a=a||window.event;var c=a.target||a.srcElement;g(c,h)}var i=document.getElementsByTagName(“img”);b=i.length;d=0;for(var j=0,k;j<b;++j){k=i[j];if(k.complete||typeof k.src!=”string”||!k.src)++d;else if(k.addEventListener){k.addEventListener(“load”,h,false);k.addEventListener(“error”,
h,false)}else{k.attachEvent(“onload”,h);k.attachEvent(“onerror”,h)}}e=b-d;function l(){google.timers.load.t.ol=(new Date).getTime();google.timers.load.t.iml=f;google.kCSI.imc=d;
google.kCSI.imn=b;google.kCSI.imp=e;
google.report&&google.report(google.timers.load,google.kCSI)}if(window.addEventListener)window.addEventListener(“load”,l,false);
else if(window.attachEvent)window.attachEvent(“onload”,l);google.timers.load.t.prt=(f=(new Date).getTime());
})();
</script>