js/local.js
// Event handler that removes a player from storage by getting the name of the key associated with the X on the line clicked.
Event handler that removes a player from storage by getting the name of the key associated with the X on the line clicked.
Event handler that removes a player from storage by getting the name of the key associated with the X on the line clicked .
function removeStorage(event){
  event.preventDefault();
  if (event.target === event.target.parentElement.children[3]){
    var removeMe = event.target.parentElement.children[0].textContent;
    localStorage.removeItem(removeMe);
    table.innerHTML = '';
    makeHeaders();
    callStorage();
  }
}
function removeStorage ( event ) { event . preventDefault ( ) ; if ( event . target === event . target . parentElement . children [ 3 ] ) { var removeMe = event . target . parentElement . children [ 0 ] . textContent ; localStorage . removeItem ( removeMe ) ; table . innerHTML = '' ; makeHeaders ( ) ; callStorage ( ) ; } }
Event handler that removes a player from storage by getting the name of the key associated with the X on the line clicked.
Event handler that removes a player from storage by getting the name of the key associated with the X on the line clicked .
// This looks for the name at the beginning of the row clicked // and then removes it from local storage // Clear the table and call the functions to rewrite it with the new local storage data