Skip to content

Instantly share code, notes, and snippets.

@rogerscg
Created May 18, 2016 17:18
Show Gist options
  • Save rogerscg/738027e8fa70066cf6716f8812bd86d6 to your computer and use it in GitHub Desktop.
Save rogerscg/738027e8fa70066cf6716f8812bd86d6 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name TagPro Immersion
// @namespace http://www.tagproleague.com
// @description Stadium sound immersion for TagPro Classic
// @include http://tagpro-*.koalabeast.com:*
// @include http://tangent.jukejuice.com:*
// @include http://*.newcompte.fr:*
// @include http://tagpro-*.koalabeast.com/
// @include http://tangent.jukejuice.com/
// @include http://*.newcompte.fr/
// @include http://tagpro-*.koalabeast.com/groups/*
// @include http://tangent.jukejuice.com/groups/*
// @include http://*.newcompte.fr/groups/*
// @author SuperSans
// @version 0.1
// ==/UserScript==
function startSound(){
console.log("Immersion Running");
var teleport_s = document.getElementById("teleport");
var sources = teleport_s.getElementsByTagName("source");
for(var i=0; i<sources.length; i++){
var source = sources[i];
source.src = "http://www.tagproleague.com/assets/audio/portal.wav";
}
teleport_s.load();
teleport_s = document.getElementById("cheering");
sources = teleport_s.getElementsByTagName("source");
for(var i=0; i<sources.length; i++){
var source = sources[i];
source.src = "http://www.tagproleague.com/assets/audio/cap_sound_01.wav";
}
teleport_s.load();
}
tagpro.ready(startSound);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment