
Show HN: A Chrome extension that adds moustaches to every face on the web - andrewnez
https://chrome.google.com/webstore/detail/khaoakmndhjandiaaadnjgnbchillcdj
======
Sephr
This is not that novel of an extension. It's essentially the following (see
[https://github.com/forward/mustachio-
chrome/blob/master/must...](https://github.com/forward/mustachio-
chrome/blob/master/mustachio.js)):

    
    
        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.

~~~
aidanfeldman
way ahead of ya: <https://github.com/afeld/mustachio-js>

~~~
biot
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.

~~~
aidanfeldman
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.

------
sosuke
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...](http://mustachy.heroku.com/?src=http://4.bp.blogspot.com/-KI0L4JXyzy8/Tann4CJl_5I/AAAAAAAAA5I/gb7laorTFCM/s1600/Celebrity-
Hairstyles-2011.jpg)

~~~
shadchnev
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.

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

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

~~~
aidanfeldman
en garde! <https://github.com/afeld/mustachio>

------
jessedhillon
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.

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

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

~~~
anigbrowl
I'm meddling with forces I do not understand!

~~~
Groxx
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.

~~~
anigbrowl
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.

------
maushu
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.

~~~
andrewnez
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!

------
rookie
bookmarklet

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

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

~~~
andrewnez
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.

~~~
mberning
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.

~~~
Sephr
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.

------
kodablah
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.

------
schpet
This has turned my Google logo black while searching:

[http://mustachy.heroku.com/?src=http://www.google.com/images...](http://mustachy.heroku.com/?src=http://www.google.com/images/nav_logo83.png)

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

------
katieben
hahaha okay props for an awesome idea (:

------
Andi
What is this good for beyond wasting your time?

~~~
binarysolo
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.

