128 comments

[ 2.5 ms ] story [ 55.2 ms ] thread
Pretty sure this is genius. Finally a .js site that makes sense.
Demo?
Just scroll on the site itself
They should have included more text to allow more scrolling.
or shorten your window
In Safari on OS X Lion/Mountain Lion, the rubber banding effect will continually trigger it if you keep scrolling up at the top of the page.
Doesn't seem to work on firefox or chromium.
make your window smaller to allow more scrolling / farting.
You can open up the console on their site and change the scroll distance between noises.

It really seems like they should add some lorem ipsum text to give a better representation of farts in the wild.

Seems to only run once per page load. You can reload to hear it again in case you missed it.
This is the most important development of our time. You cannot deny this.
I wonder if putting something like this on a checkout page for Gas-X or anti-diarrheals might actually increase conversions.
This jQuery extension is a breath of fresh air
Air? sure. Fresh? Probably not. ;)
ThatsTheJoke.gif
Annnd... we're reddit.
annnnd... sometime it's good to relax a little...
Can this be considered a code smell?
The sounds are included directly in the JS, which is pretty neat: https://github.com/theonion/fartscroll.js/blob/master/fartsc...
And in ogg as well as mp3, to boot. Settling once and for all the great question which of these two codecs is more efficient at encoding flatulence.
Well - which is more efficient?
What's important is that neither stinks.
I would say that including two audio assets for the same sound seems like a code smell.
Perhaps an MP3 => OGG JavaScript converter is in order.
Transcoding is not a computationally cheap endeavor…
Well, since we are talking about a demo/proof of concept it could be interesting to try.
In case it slipped right past your nose, the previous comments were a play-on-words in reference to the library.
It didn't, but I was wondering about the actual technical aspect of using a single asset type and a codec as a shiv.
I think he meant to say an MP3 => OGG JavaScript converter is an odor.
At least in terms of size, the mp3 strings are 23%~ lighter than the ogg strings.
Curious what quality they encoded them with.
The ogg's bitrate is 35kb/s. The mp3's bitrate is 32kb/s. The sample rate for both is 11025 Hz.
It's because Firefox doesn't support mp3 via the HTML5 <audio> tag due to licensing IIRC. IE supports mp3 but not ogg. Chrome supports both.
The novelty of the fart sounds is funny, but the JS implementation is fascinating.
Presumably they did that just to avoid external dependencies.

Talk about anal...

How did they convert the mp3/ogg into strings?
Love Base64 encoding... for anyone looking to optimize their CSS, check out Shaun Inman's CSS Cacheer... it can automatically inline images using that encoding: http://www.shauninman.com/archive/2008/05/30/check_out_css_c...

Sorry for slightly OT, but I really do love Base64...

Or if you're on Rails, there's a little-known helper as part of the asset pipeline that will do this for you:

    #logo { background: url(<%= asset_data_uri 'logo.png' %>) }
The Internet is finally useful. Thanks, The Onion!

On a side note, I can't be the only one trying to memorize the embedded Base64 representations of fart mp3s, can I? That would kill at parties.

Oh yes, the suspense and rollercoaster thrill of the "watching a person type a 2100 character string" setup would just make the "listen to a half-second fart noise" that much more amazing.
Well, I once attended a party where a guy typed a 128 bytes program in binary form (using ALT + number) in edit, run it in DOS and the thing did what was expected. That was amazing and totally worth the wait :)

The 90s, don't ask.

I need to go to more of your parties, then, where my skills can be appreciated :P
Now I am no longer the only one that makes fart noises as they scroll!
this is how you get your kid jnto programmig
Brilliant. Thanks HTML5
Jokes aside, I see this extension being used in one of those "causes" pages (not that I am against them) that parody the wrongdoings of an individual or groups of individual.

e.g. a site that features an oil company, who lobbies governments to give them tax subsidies for sketchy oil drilling projects. As the user scrolls through each bad points about the oil company, a fart sound is played.

Just my thought.

This could actually prove to be useful (aside from the comedic value, and learning exercise). I'll test to see if playing audio offers will make a difference in conversions. One thing for sure, my girls will love playing around with it. :D

http://pullmyfinger.com is taken. ):

My visit duration to the fartscroll page was increased by about 1000% because of this plugin.

I normally would have clicked away long ago, but now I find myself wanting to just leave it open in a side tab all day long.

All of the fart apps in the App Store are now ready for that transition from native to multi-platform web based applications.
Lets put this into a bookmarklet :P
Done: https://gist.github.com/fabriceleal/5547487.

Tested in hacker news (no jQuery) and wikipedia (has jQuery). For some reason, github doesn't like that I'm loading something from raw.github.com/...

Chrome console says:

Refused to load the script 'https://raw.github.com/theonion/fartscroll.js/master/fartscr... because it violates the following Content Security Policy directive: "script-src https://github.com https://a248.e.akamai.net https://jobs.github.com https://ssl.google-analytics.com https://secure.gaug.es https://gist.github.com.

am I the only one thinking of combining this and the konami code JS for a great easter egg implementation?
awkward moment looking at this whilst interviewing an intern
People laughed when it was said that perhaps The Onion could save Journalism.

Who's laughing now, eh!?

You could call this brilliant advertising: Those laughing now are most likely to be males between the ages of 12 and 34. :)
If I stop laughing at fart sounds when I'm 35, it'll be because I'm dead.
It's just a demographics joke. I hope you are still amused by flatulence past the ripe old age of 34... even if you do cause a world-rending paradox, you selfish bastard.
43 and still laughing. Teaching my 6-year-old to make the sounds. All is well.
Almost 50. I laugh through the tears at fart sounds.
This would be perfectly suited on any Magento website, especially magentocommerce.com
The best part of this entire thing may be that in "Issues", there is a pull request for "My Finger".
I can't believe that's my only public activity ever on Github :/