1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-10 08:10:52 +00:00

Initial commit for modular FrankerFaceZ rewrite.

This commit is contained in:
SirStendec 2015-01-12 17:58:07 -05:00
parent b74fdaa22b
commit f1377bc989
27 changed files with 2717 additions and 1034 deletions

22
src/debug.js Normal file
View file

@ -0,0 +1,22 @@
var FFZ = window.FrankerFaceZ;
// --------------------
// Debug Command
// --------------------
FFZ.chat_commands.debug = function(room, args) {
var enabled, args = args && args.length ? args[0].toLowerCase() : null;
if ( args == "y" || args == "yes" || args == "true" || args == "on" )
enabled = true;
else if ( args == "n" || args == "no" || args == "false" || args == "off" )
enabled = false;
if ( enabled === undefined )
enabled = !(localStorage.ffzDebugMode == "true");
localStorage.ffzDebugMode = enabled;
return "Debug Mode is now " + (enabled ? "enabled" : "disabled") + ". Please refresh your browser.";
}
FFZ.chat_commands.debug.help = "Usage: /ffz debug [on|off]\nEnable or disable Debug Mode. When Debug Mode is enabled, the script will be reloaded from //localhost:8000/script.js instead of from the CDN.";