Guest User

Untitled

a guest
Jan 20th, 2016
535
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Cam's Sounds (OmicroN modified)
  3. // @namespace http://tagpro.gg/
  4. // @version 1.0
  5. // @include http://tagpro-*.koalabeast.com:*
  6. // @include http://tangent.jukejuice.com:*
  7. // @include http://*.newcompte.fr:*
  8. // @description Change the sounds of tagpro to Cam's sound pack.
  9. // @author RonSpawnson, Cyanide, Seconskin, Cam, Acid Rap
  10. // @reference https://www.reddit.com/r/TagPro/wiki/api
  11. // ==/UserScript==
  12.  
  13. var customSounds = {
  14. 'drop': 'https://a.clyp.it/vilyqhzc.mp3',
  15. 'friendlydrop': 'https://a.clyp.it/jer5p3ow.mp3',
  16. 'cheering': 'https://a.clyp.it/nulqyxat.mp3',
  17. 'sigh': 'https://a.clyp.it/h5hjh4l4.mp3',
  18. 'burst': 'https://a.clyp.it/lpmf4afe.mp3',
  19. 'friendlyalert': 'https://a.clyp.it/gmmdkusi.mp3',
  20. 'alert': 'https://a.clyp.it/m2yz5dhg.mp3',
  21. 'pop': 'https://a.clyp.it/iyqajrfl.mp3',
  22. 'click': 'https://a.clyp.it/tjf0pwd2.mp3',
  23. 'explosion': 'https://a.clyp.it/q0mx5k34.mp3',
  24. 'countdown': 'https://a.clyp.it/xjgdxgxy.mp3',
  25. 'alertlong': 'https://a.clyp.it/nsl4cfhm.mp3',
  26. 'go': 'https://a.clyp.it/kjycagbz.mp3',
  27. 'degreeup': 'https://a.clyp.it/vyzkn52t.mp3',
  28. 'teleport': 'https://a.clyp.it/o3omevmg.mp3',
  29. 'powerup': 'https://a.clyp.it/ot5hidv1.mp3'
  30. };
  31.  
  32. tagpro.ready(function () {
  33. for (var snd in customSounds) {
  34. if (customSounds.hasOwnProperty(snd)) {
  35. // Remove all audio sources for sound except the first
  36. $('audio#' + snd).find('source:gt(0)').remove();
  37.  
  38. // Replace the first audio source with the new sound
  39. $('audio#' + snd).find('source').attr('src', customSounds[snd]);
  40.  
  41. // Reload the sound with the new source
  42. $('audio#' + snd)[0].load();
  43. }
  44. }
  45. });
Add Comment
Please, Sign In to add comment