Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: A Chrome extension that adds moustaches to every face on the web (chrome.google.com)
90 points by andrewnez on Aug 12, 2011 | hide | past | favorite | 31 comments


This is not that novel of an extension. It's essentially the following (see https://github.com/forward/mustachio-chrome/blob/master/must...):

    var i = document.images.length;
    while(i--) document.images[i].src = "http://mustachy.heroku.com/?src=" + document.images[i].src;
I might be more impressed if the author ported mustachio (https://github.com/afeld/mustachio) to JavaScript.



Doesn't that just run on node.js? Replacing the image with a canvas tag that renders the original image + mustache image would require no server.


Correct, though there does need to be a server component to communicate with the Face.com API. Face detection is a much slower process than image compositing, so this is really the limiting factor.


It works but their poor server must be hurting, tons of 500 and 503 errors.

Tested loading http://celebrityhairstylespicture.blogspot.com/

Example http://mustachy.heroku.com/?src=http://4.bp.blogspot.com/-KI...


I just deployed version 0.0.7 that skips any images of less than 45000 pixels (300x150px or equivalent). This will help with the load but you won't see the moustaches on smaller images.


We are trying to scale the service up at the moment, and also optimising the extension to reduce the number of redundant requests.


We've also open sourced the code for this extension here: https://github.com/forward/mustachio-chrome


Any chance you could open source the server bits too? :D



A sysadmin could use this to setup a funny prank involving background caching through a squid proxy -- replace all HTTP requests for images with mustachioed versions, for everyone on the network.


A capital jape, my good sir - but it is as nothing compared with the monocular terror which awaits us.


I think you've just given me a weekend project. Such a thing must be unleashed into the world.


I did it, monocles included :) - http://news.ycombinator.com/item?id=2897549


I'm meddling with forces I do not understand!


My brain has apparently decided to sleep instead, this weekend... oh well. It's still at the top of my list. I'll stick up a Show when I finish.


When you get around to it, perhaps there are some viral giggles to be had by using some secret algorithm to select the left or right eye, or letting user selections shift it. I'm on gmail and in SF if you want to chuckle over a beverage, although I don't have any coding chops worth talking about.


Wouldn't it be better to use a JavaScript face detector? Like http://liuliu.me/detect/detect.html

I don't know the details about this algorithm though, no idea if you can get the proper position for the mustache.


Yeah we are looking at refactoring some of the face detection stuff out of the server and into the extension.

We wrote the code in a single hour this afternoon so it's not the most optimized piece of software and we are feeling it right now!


bookmarklet

  javascript:void(location.href="http://mustachify.me/?src="+location.href)


Needs access to all my data on all websites. No thanks.


The code for the extension is freely available on github (https://github.com/forward/mustachio-chrome), you can see that we aren't doing anything shady with your data.


Yeah, I could do that, but to be blunt I'm not going to waste my time analyzing the security implications of installing some novelty app. In my opinion, and I am by no means an expert on writing chrome extensions, the more appropriate thing to do would be to tweak your extension so that it only uses the functionality it requires to work. Surely it does not need access to everything in my browser to do what it does.

Look at it this way, if you were selling this thing for $.99 on the android app store and I wanted to install it, and I saw that it needed such broad permissions, you would have just lost out on a sale. Something to keep in mind should you ever move to monetize this in the future.


How else would one edit the image elements in the DOM of every website without access to the websites? That's like being upset that the AdBlock Plus Firefox extension that blocks traffic from ad servers needs access to your HTTP traffic.


It would be neat if this was all in JS and required the user to put in his face.com API key. You could add a context menu on an image and then replace that image w/ a Canvas w/ the image and the mustache on top of it.


This has turned my Google logo black while searching:

http://mustachy.heroku.com/?src=http://www.google.com/images...


Very cool idea, I so need to do this for http://laserey.es! :)


hahaha okay props for an awesome idea (:


What is this good for beyond wasting your time?


I think extensions of this idea -- running a pic modifier with useful information or ads (gasp!) or NSFW censorship (!!!!!) would be the next logical step for various people.

That is, once the tech is there. Face abstraction is a completely different ballgame than, say, product pictures or porn.


I believe that is precisely the point of it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: