Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nodebb-theme-peace

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodebb-theme-peace - npm Package Compare versions

Comparing version 2.0.6 to 2.0.7

public/admin.js

20

lib/library.js

@@ -12,2 +12,5 @@ 'use strict';

const routeHelpers = require.main.require('./src/routes/helpers');
routeHelpers.setupAdminPageRoute(params.router, '/admin/plugins/peace', function (req, res, next) {
res.render('admin/plugins/peace', {});
});
};

@@ -46,3 +49,3 @@

library.addUserToTopic = async function (hookData) {
library.filterTopicBuild = async function (hookData) {
if (hookData.req.user) {

@@ -63,2 +66,17 @@ const userData = await user.getUserData(hookData.req.user.uid);

library.filterConfigGet = async function (config) {
const settings = await meta.settings.get('peace');
config.enableQuickReply = settings.enableQuickReply === 'on';
return config;
};
library.addAdminNavigation = async function (header) {
header.plugins.push({
route: '/plugins/peace',
icon: 'fa-paint-brush',
name: 'Peace Theme'
});
return header;
};
library.filterMiddlewareRenderHeader = async function (hookData) {

@@ -65,0 +83,0 @@ const userSettings = await user.getSettings(hookData.req.uid);

2

package.json
{
"name": "nodebb-theme-peace",
"version": "2.0.6",
"version": "2.0.7",
"nbbpm": {

@@ -5,0 +5,0 @@ "compatibility": "^3.0.0"

@@ -6,8 +6,14 @@ {

{ "hook": "filter:widgets.getAreas", "method": "defineWidgetAreas" },
{ "hook": "filter:topic.build", "method": "addUserToTopic" },
{ "hook": "filter:middleware.renderHeader", "method": "filterMiddlewareRenderHeader" }
{ "hook": "filter:config.get", "method": "filterConfigGet" },
{ "hook": "filter:topic.build", "method": "filterTopicBuild" },
{ "hook": "filter:middleware.renderHeader", "method": "filterMiddlewareRenderHeader" },
{ "hook": "filter:admin.header.build", "method": "addAdminNavigation" }
],
"scripts": [
"public/peace.js"
]
],
"modules": {
"../admin/plugins/peace.js": "public/admin.js",
"persona/quickreply.js": "../nodebb-theme-persona/public/modules/quickreply.js"
}
}

@@ -7,2 +7,4 @@ "use strict";

setupNProgress();
setupQuickReply();
$('[component="skinSwitcher"]').on('click', '.dropdown-item', function () {

@@ -68,2 +70,16 @@ const skin = $(this).attr('data-value');

}
function setupQuickReply() {
$(window).on('action:ajaxify.end', function (ev, data) {
if (data.url && data.url.match('^topic/')) {
if (config.enableQuickReply) {
require(['persona/quickreply'], function (quickreply) {
if (quickreply) {
quickreply.init();
}
});
}
}
});
}
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc