Improved inventory

This commit is contained in:
2017-10-05 09:39:37 +02:00
parent 77ae39d330
commit 09d28e146c
5 changed files with 69 additions and 15 deletions

View File

@ -302,6 +302,25 @@ export function removeAnimeFromCollection(arn: AnimeNotifier, button: HTMLElemen
.then(() => arn.loading(false))
}
// Use item
// export function useItem(arn: AnimeNotifier, button: HTMLElement) {
// let slotIndex = ""
// let parent = button
// while(parent = parent.parentElement) {
// if(parent.dataset.index !== undefined) {
// slotIndex = parent.dataset.index
// break
// }
// }
// let apiEndpoint = arn.findAPIEndpoint(button)
// arn.post(apiEndpoint + "/use/" + slotIndex, "")
// .then(() => arn.reloadContent())
// .catch(err => arn.statusMessage.showError(err))
// }
// Chrome extension installation
export function installExtension(arn: AnimeNotifier, button: HTMLElement) {
let browser: any = window["chrome"]