nodebb-plugin-composer-default 10.3.8 → 10.3.10

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/library.js CHANGED
@@ -44,27 +44,6 @@ plugin.addAdminNavigation = async function (header) {
44
44
  return header;
45
45
  };
46
46
 
47
- plugin.addPrefetchTags = async function (hookData) {
48
- const { req } = hookData;
49
- if (req.uid > 0) {
50
- const prefetch = [
51
- '/assets/src/modules/composer.js', '/assets/src/modules/composer/uploads.js', '/assets/src/modules/composer/drafts.js',
52
- '/assets/src/modules/composer/tags.js', '/assets/src/modules/composer/categoryList.js', '/assets/src/modules/composer/resize.js',
53
- '/assets/src/modules/composer/autocomplete.js', '/assets/templates/composer.tpl',
54
- `/assets/language/${meta.config.defaultLang || 'en-GB'}/topic.json`,
55
- `/assets/language/${meta.config.defaultLang || 'en-GB'}/modules.json`,
56
- `/assets/language/${meta.config.defaultLang || 'en-GB'}/tags.json`,
57
- ];
58
-
59
- hookData.links = hookData.links.concat(prefetch.map(path => ({
60
- rel: 'prefetch',
61
- href: `${nconf.get('relative_path') + path}?${meta.config['cache-buster']}`,
62
- })));
63
- }
64
-
65
- return hookData;
66
- };
67
-
68
47
  plugin.getFormattingOptions = async function () {
69
48
  const defaultVisibility = {
70
49
  mobile: true,
@@ -120,8 +99,7 @@ plugin.getFormattingOptions = async function () {
120
99
  };
121
100
 
122
101
  plugin.filterComposerBuild = async function (hookData) {
123
- const { req } = hookData;
124
- const { res } = hookData;
102
+ const { req, res } = hookData;
125
103
 
126
104
  if (req.query.p) {
127
105
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-composer-default",
3
- "version": "10.3.8",
3
+ "version": "10.3.10",
4
4
  "description": "Default composer for NodeBB",
5
5
  "main": "library.js",
6
6
  "repository": {
package/plugin.json CHANGED
@@ -6,8 +6,7 @@
6
6
  { "hook": "static:app.load", "method": "init" },
7
7
  { "hook": "filter:config.get", "method": "appendConfig" },
8
8
  { "hook": "filter:composer.build", "method": "filterComposerBuild" },
9
- { "hook": "filter:admin.header.build", "method": "addAdminNavigation" },
10
- { "hook": "filter:meta.getLinkTags", "method": "addPrefetchTags" }
9
+ { "hook": "filter:admin.header.build", "method": "addAdminNavigation" }
11
10
  ],
12
11
  "scss": [
13
12
  "./static/scss/composer.scss"