mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
lint: Run eslint --fix
on src/
This commit is contained in:
parent
b8d07a42eb
commit
8e5fd19db2
109 changed files with 9061 additions and 10572 deletions
|
@ -33,25 +33,25 @@ function randomPadName() {
|
|||
for (let i = 0; i < string_length; i++) {
|
||||
// instead of writing "Math.floor(randomarray[i]/256*64)"
|
||||
// we can save some cycles.
|
||||
const rnum = Math.floor(randomarray[i]/4);
|
||||
const rnum = Math.floor(randomarray[i] / 4);
|
||||
randomstring += chars.substring(rnum, rnum + 1);
|
||||
}
|
||||
return randomstring;
|
||||
}
|
||||
|
||||
$(() => {
|
||||
$('#go2Name').submit(function() {
|
||||
$('#go2Name').submit(() => {
|
||||
const padname = $('#padname').val();
|
||||
if (padname.length > 0) {
|
||||
window.location = 'p/' + encodeURIComponent(padname.trim());
|
||||
window.location = `p/${encodeURIComponent(padname.trim())}`;
|
||||
} else {
|
||||
alert('Please enter a name');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#button').click(function() {
|
||||
window.location = 'p/' + randomPadName();
|
||||
$('#button').click(() => {
|
||||
window.location = `p/${randomPadName()}`;
|
||||
});
|
||||
|
||||
// start the custom js
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue