Last active
June 23, 2016 19:35
-
-
Save chancrescolex/5da0f937c5e3fefba1f9 to your computer and use it in GitHub Desktop.
Automatically sets the video, sound, and music settings for you on each TagPro server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name TagPro Auto-Settings | |
| // @version 0.3 | |
| // @author chancrescolex/j.walk, update of work by Karl Ding/0K, with help from gofioTP/gofio | |
| // @namespace http://reddit.com/u/chancrescolex | |
| // @description Automatically sets the video, sound, and music settings for you on each server | |
| // @include http://*.koalabeast.com:* | |
| // @include http://*.koalabeast.com/* | |
| // @include http://*.jukejuice.com:* | |
| // @include http://*.jukejuice.com/* | |
| // @include http://*.newcompte.fr:* | |
| // @include http://*.newcompte.fr/* | |
| // @downloadURL https://gist.github.com/chancrescolex/5da0f937c5e3fefba1f9/raw/TagPro%20Auto-Settings.user.js | |
| // ==/UserScript== | |
| $(document).ready(function() { | |
| var cookieHost = '.' + document.location.hostname.split('.').slice(-2).join('.'); | |
| // Set to true to disable particle effects, false to enable them. | |
| $.cookie('disableParticles', true, { expires: 36500, path: "/", domain: cookieHost }); | |
| // Set to true to enable the old renderer, false to use the new WebGL renderer. | |
| $.cookie('forceCanvasRenderer', false, { expires: 36500, path: "/", domain: cookieHost }); | |
| // Set to true to disable viewport scaling, false to enable it. | |
| $.cookie('disableViewportScaling', false, { expires: 36500, path: "/", domain: cookieHost }); | |
| // Set to true to turn in-game music on, false to turn it off. | |
| $.cookie('music', false, { expires: 36500, path: "/", domain: cookieHost }); | |
| // Set to true to turn in-game sound on, false to turn it off. | |
| $.cookie('sound', false, { expires: 36500, path: "/", domain: cookieHost }); | |
| if(document.URL.search('/settings')>=0) { | |
| $('#disableViewportScaling').after( "<p id='override'>Manual changes will be overridden by Tagpro Auto-Settings userscript!</p>" ); | |
| $('#saveSettings').after( "<p id='override'>Manual changes will be overridden by Tagpro Auto-Settings userscript!</p>" ); | |
| $('#override').css({'font-style':'italic','color':'#FFF','font-size':'14px'}); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment