define(function (require, exports, module) {

  const Plugin = require('extplug/Plugin');
  const Events = require('plug/core/Events');

  const HideBadges = Plugin.extend({
    name: 'Hide Badges',
    description: 'Hides user chat badges.',

    settings: {
      inline: { type: 'boolean', label: 'Inline Chat', default: false }
    },

    enable() {
      this._super();
      this.Style({
        '#chat': {
          '.msg': { padding: '5px 8px 6px 8px' },
          '.badge-box': { display: 'none' }
        }
      });
      Events.on('chat:afterreceive', this.onMessage, this);
    },

    disable() {
      this._super();
      Events.off('chat:afterreceive', this.onMessage, this);
    },

    onMessage(message, el) {
      if (!this.settings.get('inline')) return;
      if ([ 'message', 'moderation', 'mention', 'emote' ].indexOf(message.type) !== -1) {
        el.addClass('inline');
      }
    }

  });

  module.exports = HideBadges;

});

@@ -341,61 +341,17 @@
     
-enable() %7B%0A      this._super();%0A      this.Style(%7B%0A  
+style: %7B%0A
     
@@ -371,18 +371,16 @@
         
-  
 '.msg': 
@@ -384,16 +384,28 @@
 ': %7B
- 
+%0A          '
 padding
+'
 : '5
@@ -423,14 +423,20 @@
 8px'
+%0A       
  %7D,%0A
-  
     
@@ -458,44 +458,373 @@
 ': %7B
- display: 'none' %7D%0A        %7D%0A      %7D
+%0A          // can't just display:none, because the user rollover positions itself%0A          // relative to the badge box%0A          'visibility': 'hidden',%0A          'width': 0,%0A          'margin-left': 0%0A        %7D,%0A        '.cm.inline .badge-box': %7B%0A          'margin-left': 0,%0A          'margin-right': 0%0A        %7D%0A      %7D%0A    %7D,%0A%0A    enable() %7B%0A      this._super(
 );%0A 

fix user rollover position when badges are hidden, closes #1