ep_disable_chat 0.0.44 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/disable_chat.js +8 -7
  2. package/package.json +4 -1
package/disable_chat.js CHANGED
@@ -1,12 +1,13 @@
1
1
  'use strict';
2
2
 
3
- exports.eejsBlock_styles = (hookName, context, cb) => {
4
- context.content += `<style>
5
- .hide-for-mobile { display:none !important; }
6
- #chaticon, #chatbox { display: none !important; }
3
+ const {hideCSS} = require('ep_plugin_helpers');
4
+
5
+ exports.eejsBlock_styles = hideCSS('.hide-for-mobile, #chaticon, #chatbox', {
6
+ // Once chat is hidden the users panel takes over the full popup; without
7
+ // these height rules the popup collapses to the (now-empty) chat region.
8
+ extra: `
7
9
  #users { height:100%; }
8
10
  .popup#users.chatAndUsers > .popup-content { height:100%; }
9
11
  .popup#users.chatAndUsers { height:100%; }
10
- </style>`;
11
- cb();
12
- };
12
+ `,
13
+ });
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "deprecated": false,
10
10
  "description": "Disable Chat in Etherpad",
11
11
  "name": "ep_disable_chat",
12
- "version": "0.0.44",
12
+ "version": "0.0.45",
13
13
  "funding": {
14
14
  "type": "individual",
15
15
  "url": "https://etherpad.org/"
@@ -29,5 +29,8 @@
29
29
  "repository": {
30
30
  "type": "git",
31
31
  "url": "https://github.com/ether/ep_disable_chat"
32
+ },
33
+ "dependencies": {
34
+ "ep_plugin_helpers": "^0.5.0"
32
35
  }
33
36
  }