nosdav / pastebin

NosDAV pastebin
https://nosdav.github.io/pastebin/
MIT License
8 stars 1 forks source link

Remove unused 'checkbox' variable #11

Closed melvincarvalho closed 1 year ago

melvincarvalho commented 1 year ago

Description

The 'checkbox' variable is declared in the 'updateDownloadLink' function but is not used in the code. It should be removed to clean up the code.

Suggested change

Replace the current 'updateDownloadLink' function with the following:

updateDownloadLink() {
  const inputSlug = document.getElementById('file-name').value;
  const downloadLink = document.getElementById('download');

  let filename;

  filename = inputSlug;

  const path = getPath(serverUrl, this.state.userPublicKey, filename, mode);
  downloadLink.setAttribute('href', path);
}