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 +1 -1
- package/demo.gif +0 -0
- package/demo.png +0 -0
- package/index.js +7 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
 [](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.
|
|
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.
|
|
31
|
+
"typescript": "^6.0.3"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"lint": "eslint .",
|