Commit d8c0d859 authored by Nicolas Pernoud's avatar Nicolas Pernoud
Browse files

fix: code smells

parent 70b88899
Pipeline #24868 passed with stage
in 1 minute and 14 seconds
......@@ -535,7 +535,7 @@ export class Explorer {
});
}
};
xhr.onerror = function (e) {
xhr.onerror = function (_e) {
reject({
status: this.status,
statusText: `Error uploading ${file.name} (status ${xhr.status})`,
......
......@@ -32,7 +32,7 @@
<div class="navbar-brand">
<div class="navbar-item">
<a class="button is-primary is-rounded is-outlined" href="https://www.github.com/nicolaspernoud/Vestibule" target="_blank" rel="noopener noreferrer">
<span>4.5.21</span>
<span>4.5.22</span>
<span class="icon">
<svg
class="svg-inline--fa fa-github fa-w-16"
......
export const AnimateCSS = (element, animation, prefix = "animate__") =>
// We create a Promise and return it
new Promise((resolve, reject) => {
new Promise((resolve, _reject) => {
const animationName = `${prefix}${animation}`;
element.classList.add(`${prefix}animated`, animationName);
......@@ -51,7 +51,7 @@ export function GetType(file) {
export const Truncate = (input) => (input.length > 12 ? `${input.substring(0, 12)}...` : input);
export function EncodeURIWithSpecialsCharacters(str) {
return encodeURI(str).replace(/[!'()*]/g, escape);
return encodeURI(str).replace(/[!'()*]/g, encodeURIComponent);
}
export function IsEmpty(obj) {
......
......@@ -20,16 +20,16 @@ export function Show(bulmaClass, message) {
offset = offset + height;
messages.push(message);
const timer = setTimeout(function () {
removeMsg(msg, message, height);
removeMsg(msg, message);
}, 5000);
delBtn.addEventListener("click", function () {
removeMsg(msg, message, height);
removeMsg(msg, message);
clearTimeout(timer);
});
}
}
async function removeMsg(msg, message, height) {
async function removeMsg(msg, message) {
const index = messages.indexOf(message);
if (index > -1) {
messages.splice(index, 1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment