ep_timesliderdiff 0.0.60 → 0.0.62

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.
@@ -29,7 +29,7 @@ jobs:
29
29
  - uses: actions/setup-node@v6
30
30
  name: Install Node.js
31
31
  with:
32
- node-version: 22
32
+ node-version: 25
33
33
  - uses: pnpm/action-setup@v6
34
34
  name: Install pnpm
35
35
  with:
@@ -19,7 +19,7 @@ jobs:
19
19
  - uses: actions/setup-node@v6
20
20
  name: Install Node.js
21
21
  with:
22
- node-version: 22
22
+ node-version: 25
23
23
  - uses: pnpm/action-setup@v6
24
24
  name: Install pnpm
25
25
  with:
@@ -23,7 +23,7 @@ jobs:
23
23
  # OIDC trusted publishing needs npm >= 11.5.1, which requires
24
24
  # Node >= 20.17.0. setup-node's `20` resolves to the latest
25
25
  # 20.x, which satisfies that.
26
- node-version: 20
26
+ node-version: 25
27
27
  registry-url: https://registry.npmjs.org/
28
28
  - name: Upgrade npm to >=11.5.1 (required for trusted publishing)
29
29
  run: npm install -g npm@latest
package/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
+ const {template} = require('ep_plugin_helpers');
3
4
  const eejs = require('ep_etherpad-lite/node/eejs');
4
5
 
5
- exports.eejsBlock_timesliderEditbarRight = (hook_name, args, cb) => {
6
- // The diff view relies on endpoints that the read-only timeslider cannot
7
- // reach, so suppress the button entirely for read-only viewers (regression
8
- // for #4). `renderContext.isReadOnly` is set by specialpages.ts when
9
- // rendering `/p/:pad/timeslider`.
10
- if (args.renderContext && args.renderContext.isReadOnly) return cb();
11
- args.content += eejs.require('ep_timesliderdiff/templates/timesliderDiff.ejs');
12
- cb();
13
- };
6
+ // The diff view relies on endpoints that the read-only timeslider cannot
7
+ // reach, so suppress the button entirely for read-only viewers (regression
8
+ // for #4). `renderContext.isReadOnly` is set by specialpages.ts when
9
+ // rendering `/p/:pad/timeslider`.
10
+ exports.eejsBlock_timesliderEditbarRight =
11
+ template('ep_timesliderdiff/templates/timesliderDiff.ejs', {
12
+ skip: (args) => args.renderContext && args.renderContext.isReadOnly,
13
+ });
14
14
 
15
15
  exports.eejsBlock_timesliderStyles = (hook_name, args, cb) => {
16
16
  args.content += '<link rel="stylesheet" ' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ep_timesliderdiff",
3
- "version": "0.0.60",
3
+ "version": "0.0.62",
4
4
  "description": "See a diff view showing the changes between the latest pad and a revision",
5
5
  "author": {
6
6
  "name": "John McLear",
@@ -32,5 +32,8 @@
32
32
  "scripts": {
33
33
  "lint": "eslint .",
34
34
  "lint:fix": "eslint --fix ."
35
+ },
36
+ "dependencies": {
37
+ "ep_plugin_helpers": "^0.5.0"
35
38
  }
36
39
  }