Add 'hidechat=true' URL parameter to hide all chat input/output
This commit is contained in:
parent
7a3235193d
commit
d31db2ebc5
3 changed files with 12 additions and 0 deletions
|
|
@ -8,6 +8,10 @@ $.ajax({
|
||||||
|
|
||||||
componentconstructors['chat'] = function(dynmap, configuration) {
|
componentconstructors['chat'] = function(dynmap, configuration) {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
|
if(dynmap.getBoolParameterByName("hidechat"))
|
||||||
|
return;
|
||||||
|
|
||||||
// Provides 'chat'-events by monitoring the world-updates.
|
// Provides 'chat'-events by monitoring the world-updates.
|
||||||
$(dynmap).bind('worldupdate', function(event, update) {
|
$(dynmap).bind('worldupdate', function(event, update) {
|
||||||
swtch(update.type, {
|
swtch(update.type, {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
componentconstructors['chatballoon'] = function(dynmap, configuration) {
|
componentconstructors['chatballoon'] = function(dynmap, configuration) {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
|
if(dynmap.getBoolParameterByName("hidechat"))
|
||||||
|
return;
|
||||||
|
|
||||||
me.chatpopups = {};
|
me.chatpopups = {};
|
||||||
$(dynmap).bind('playerupdated', function(event, player) {
|
$(dynmap).bind('playerupdated', function(event, player) {
|
||||||
var popup = me.chatpopups[player.name];
|
var popup = me.chatpopups[player.name];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
componentconstructors['chatbox'] = function(dynmap, configuration) {
|
componentconstructors['chatbox'] = function(dynmap, configuration) {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
|
if(dynmap.getBoolParameterByName("hidechat"))
|
||||||
|
return;
|
||||||
|
|
||||||
var chat = $('<div/>')
|
var chat = $('<div/>')
|
||||||
.addClass('chat')
|
.addClass('chat')
|
||||||
.appendTo(dynmap.options.container);
|
.appendTo(dynmap.options.container);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue