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

ep_adminpads2

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ep_adminpads2 - npm Package Compare versions

Comparing version 0.0.7 to 2.0.0

locales/en.json

11

index.js

@@ -92,3 +92,3 @@ const eejs = require('ep_etherpad-lite/node/eejs');

exports.registerRoute = async function (hook_name, args) {
exports.registerRoute = function (hook_name, args, cb) {
args.app.get('/admin/pads', function (req, res) {

@@ -100,2 +100,3 @@ let render_args = {

});
return cb();
};

@@ -130,7 +131,8 @@

exports.updatePads = async function (hook_name, args) {
exports.updatePads = function (hook_name, args, cb) {
io.emit('progress', {progress: 1});
return cb();
};
exports.eejsBlock_adminMenu = async function (hook_name, args) {
exports.eejsBlock_adminMenu = function (hook_name, args, cb) {
let hasAdminUrlPrefix = args.content.indexOf('<a href="admin/') !== -1,

@@ -140,3 +142,4 @@ hasOneDirDown = args.content.indexOf('<a href="../') !== -1,

urlPrefix = hasAdminUrlPrefix ? 'admin/' : hasTwoDirDown ? '../../' : hasOneDirDown ? '../' : '';
args.content = args.content + '<li><a href="' + urlPrefix + 'pads">Manage pads</a></li>';
args.content = args.content + '<li><a href="' + urlPrefix + 'pads" data-l10n-id="ep_adminpads2_manage-pads">Manage pads</a></li>';
return cb();
};
{
"name": "ep_adminpads2",
"version": "0.0.7",
"version": "2.0.0",
"description": "Etherpad plugin to list and delete pads in /admin.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/rhansen/ep_adminpads2",

@@ -90,3 +90,3 @@ exports.documentReady = function(hooks, context, cb) {

var padID = row.find('.padname').text();
if (confirm('Do you really want to delete the pad ' + padID + '?')) {
if (confirm(_('ep_adminpads2_confirm', {padID: padID}) || `Do you really want to delete the pad ${padID}?`)) {
doUpdate = true;

@@ -123,3 +123,3 @@ socket.emit('delete', padID);

var message = 'Unknown status';
var message = _('ep_adminpads2_unknown-status') || 'Unknown status';
if (data.message) {

@@ -178,3 +178,9 @@ message = '<span class="status">' + data.message.toString() + '</span>';

} else {
resultList.append('<tr><td colspan="4" class="no - results">No results</td></tr>');
const noResults = _('ep_adminpads2_no-results') || 'No results';
resultList.append(
$('<tr>').append(
$('<td>')
.attr('colspan', '4')
.addClass('no - results')
.text(noResults)));
}

@@ -181,0 +187,0 @@

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