ep_themes 11.0.17 → 11.0.18

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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![Publish Status](https://github.com/ether/ep_themes/workflows/Node.js%20Package/badge.svg) [![Backend Tests Status](https://github.com/ether/ep_themes/actions/workflows/test-and-release.yml/badge.svg)](https://github.com/ether/ep_themes/actions/workflows/test-and-release.yml)
1
+ ![Demo](demo.gif) [![Backend Tests Status](https://github.com/ether/ep_themes/actions/workflows/test-and-release.yml/badge.svg)](https://github.com/ether/ep_themes/actions/workflows/test-and-release.yml)
2
2
 
3
3
  # Change the styling of a pad by clicking in Settings and selecting a style
4
4
 
package/demo.gif ADDED
Binary file
package/demo.png ADDED
Binary file
package/index.js CHANGED
@@ -4,8 +4,13 @@ const eejs = require('ep_etherpad-lite/node/eejs');
4
4
  const settings = require('ep_etherpad-lite/node/utils/Settings');
5
5
 
6
6
  exports.eejsBlock_scripts = (hookName, args, cb) => {
7
+ // `defer` so the script runs after the DOM has been parsed — themes.js
8
+ // reads `document.body` at its top level, and without `defer` that's
9
+ // `null` (scripts in <head> execute synchronously before <body> is
10
+ // constructed), which threw `TypeError: Cannot read properties of null`
11
+ // and prevented the pad editor iframe from ever initialising. See #93.
7
12
  args.content = `
8
- <script src="../static/plugins/ep_themes/static/js/themes.js"></script>${args.content}`;
13
+ <script defer src="../static/plugins/ep_themes/static/js/themes.js"></script>${args.content}`;
9
14
  cb();
10
15
  };
11
16
 
@@ -14,7 +19,7 @@ exports.eejsBlock_scripts = (hookName, args, cb) => {
14
19
  // if the pad is set to (and persists) a different one (issue #68).
15
20
  exports.eejsBlock_timesliderScripts = (hookName, args, cb) => {
16
21
  args.content = `
17
- <script src="../../static/plugins/ep_themes/static/js/themes.js"></script>${args.content}`;
22
+ <script defer src="../../static/plugins/ep_themes/static/js/themes.js"></script>${args.content}`;
18
23
  cb();
19
24
  };
20
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ep_themes",
3
- "version": "11.0.17",
3
+ "version": "11.0.18",
4
4
  "description": "Change the themes, styles & colors of different parts of Etherpad Lite",
5
5
  "author": {
6
6
  "name": "John McLear",
@@ -28,7 +28,7 @@
28
28
  "devDependencies": {
29
29
  "eslint": "^8.57.1",
30
30
  "eslint-config-etherpad": "^4.0.5",
31
- "typescript": "^6.0.2"
31
+ "typescript": "^6.0.3"
32
32
  },
33
33
  "scripts": {
34
34
  "lint": "eslint .",