WebFM/webfm/static/js/favorites.js

20 lines
452 B
JavaScript
Raw Normal View History

2020-10-11 21:30:11 +00:00
const manageFavorites = (elm) => {
const classType = "btn-info";
const hasClass = elm.classList.contains(classType);
if (hasClass) {
elm.classList.remove(classType);
action = "delete";
} else {
elm.classList.add(classType);
action = "add";
}
let path = document.getElementById("path").innerHTML;
manageFavoritesAjax(action, path);
}
const loadFave = (id) => {
loadFavoriteLink(id);
}