Skip to content

Instantly share code, notes, and snippets.

@rissole
Created September 8, 2014 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rissole/3e2d6c04be3cadc84805 to your computer and use it in GitHub Desktop.
Save rissole/3e2d6c04be3cadc84805 to your computer and use it in GitHub Desktop.
[Facebook Gags Collection]: ziiip -> Rust zip sound
// ==UserScript==
// @name Facebook Gags: ziiiip
// @namespace gags
// @description ziiip -> Rust zip sound
// @include https://www.facebook.com/
// @include https://www.facebook.com/?*
// @require http://pastebin.com/raw.php?i=2GyZd2Dy
// @version 1
// @grant none
// ==/UserScript==
var ZIP_SOUND_SRC = "https://dl.dropboxusercontent.com/u/84590655/zipper.ogg";
function playZip() {
var ziiip = document.getElementById("facebook_gags_zip");
if (ziiip === null) {
ziiip = document.createElement("audio");
ziiip.src = ZIP_SOUND_SRC;
ziiip.id = "facebook_gags_zip";
document.body.appendChild(ziiip);
}
ziiip.play();
}
addMessageHook(function(msg, currentUser) {
if (msg.body.search(/zii+p/i) > -1) {
playZip();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment