Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
laclasse
etherpad
Commits
9a76a6c9
Commit
9a76a6c9
authored
Oct 01, 2020
by
Nelson Gonçalves
Browse files
Add plugin to disable name change
parent
cb42222a
Changes
4
Hide whitespace changes
Inline
Side-by-side
ep_disable_change_author_name/LICENSE.md
0 → 100644
View file @
9a76a6c9
Copyright 2020 John McLear
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
ep_disable_change_author_name/ep.json
0 → 100644
View file @
9a76a6c9
{
"parts"
:[
{
"name"
:
"disableNameInputbox"
,
"hooks"
:
{},
"client_hooks"
:
{
"postAceInit"
:
"ep_disable_change_author_name/static/js/disable:postAceInit"
}
}
]
}
ep_disable_change_author_name/package.json
0 → 100644
View file @
9a76a6c9
{
"name"
:
"ep_disable_change_author_name"
,
"description"
:
"A plugin to stop users from being able to change their names"
,
"version"
:
"0.0.13"
,
"author"
:
{
"name"
:
"johnyma22"
,
"email"
:
"john@mclear.co.uk"
,
"url"
:
"John McLear"
},
"contributors"
:
[],
"dependencies"
:
{},
"engines"
:
{
"node"
:
">= 0.4.1"
},
"_id"
:
"ep_disable_change_author_name@0.0.2"
,
"dist"
:
{
"shasum"
:
"7a668717f83a7027ecd5316aa44833c4cc105ee8"
,
"tarball"
:
"http://registry.npmjs.org/ep_disable_change_author_name/-/ep_disable_change_author_name-0.0.2.tgz"
},
"_from"
:
"ep_disable_change_author_name@*"
,
"_resolved"
:
"https://registry.npmjs.org/ep_disable_change_author_name/-/ep_disable_change_author_name-0.0.2.tgz"
,
"_npmVersion"
:
"1.4.6"
,
"_npmUser"
:
{
"name"
:
"johnyma22"
,
"email"
:
"john@mclear.co.uk"
},
"maintainers"
:
[
{
"name"
:
"johnyma22"
,
"email"
:
"john@mclear.co.uk"
}
],
"directories"
:
{},
"_shasum"
:
"7a668717f83a7027ecd5316aa44833c4cc105ee8"
}
ep_disable_change_author_name/static/js/disable.js
0 → 100644
View file @
9a76a6c9
var
$
=
require
(
'
ep_etherpad-lite/static/js/rjquery
'
).
$
;
// use jQuery
exports
.
postAceInit
=
function
(
hook_name
,
args
,
cb
)
{
$
(
'
#users input[type=text]
'
).
prop
(
'
disabled
'
,
true
);
// disable the text boxes in the users section.
$
(
'
#users input[type=text]
'
).
attr
(
'
Title
'
,
'
Name Change Disabled
'
);
// disable the text boxes in the users section.
$
(
'
body
'
).
append
(
"
<style>
\
#myusernameedit{background:lightgrey !important;}
\
#myusernameedit:hover{background:lightgrey !important;color:#333 !important}
\
</style>
"
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment