Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xamantra/0abdec366eebcea622f569ff838a7fda to your computer and use it in GitHub Desktop.
Save xamantra/0abdec366eebcea622f569ff838a7fda to your computer and use it in GitHub Desktop.
Delete all entries inside a list category in MAL. Useful for getting a fresh start in your Plan to Watch or any other section (Completed, On Hold, Dropped, Currently Watching).
var index = 0;
if (confirm(`Are you sure you want to DELETE ALL your entries in this section?`)) {
$("a.animetitle").each(function () {
var animeLink = $(this).attr("href");
var animeId = animeLink.substring(
animeLink.lastIndexOf("anime/") + 6,
animeLink.lastIndexOf("/")
);
var deleteUrl = `/ownlist/anime/${animeId}/delete`;
setTimeout(function () {
console.log(`[DELETE] Executing "${deleteUrl}"...`);
$.ajax({
type: "POST",
url: deleteUrl
});
}, index * 1000);
index++;
});
}
var index = 0;
if (confirm(`Are you sure you want to DELETE ALL your entries in this section?`)) {
$("#list-container > div.list-block > div > table > tbody > tr.list-table-data > td.data.image > a").each(function () {
var animeLink = $(this).attr("href");
var animeId = animeLink.substring(
animeLink.lastIndexOf("anime/") + 6,
animeLink.lastIndexOf("/")
);
var deleteUrl = `/ownlist/anime/${animeId}/delete`;
setTimeout(function () {
console.log(`[DELETE] Executing "${deleteUrl}"...`);
$.ajax({
type: "POST",
url: deleteUrl
});
}, index * 1000);
index++;
});
}
var index = 0;
if (confirm(`Are you sure you want to DELETE ALL your entries in this section?`)) {
$("a.animetitle").each(function () {
var mangaLink = $(this).attr("href");
var mangaId = mangaLink.substring(
mangaLink.lastIndexOf("manga/") + 6,
mangaLink.lastIndexOf("/")
);
var deleteUrl = `/ownlist/manga/${mangaId}/delete`;
setTimeout(function () {
console.log(`[DELETE] Executing "${deleteUrl}"...`);
$.ajax({
type: "POST",
url: deleteUrl
});
}, index * 1000);
index++;
});
}
var index = 0;
if (confirm(`Are you sure you want to DELETE ALL your entries in this section?`)) {
$("#list-container > div.list-block > div > table > tbody > tr.list-table-data > td.data.image > a").each(function () {
var mangaLink = $(this).attr("href");
var mangaId = mangaLink.substring(
mangaLink.lastIndexOf("manga/") + 6,
mangaLink.lastIndexOf("/")
);
var deleteUrl = `/ownlist/manga/${mangaId}/delete`;
setTimeout(function () {
console.log(`[DELETE] Executing "${deleteUrl}"...`);
$.ajax({
type: "POST",
url: deleteUrl
});
}, index * 1000);
index++;
});
}
@dattenlagiday
Copy link

dattenlagiday commented Apr 26, 2020

Thanks! and I was wondering if it works on the manga list too?

just change the line: animeLink.lastIndexOf("anime/") + 6, to animeLink.lastIndexOf("manga/") + 6,
and var deleteUrl = /ownlist/anime/${animeId}/delete; to var deleteUrl = /ownlist/manga/${animeId}/delete;
worked for me

@aerynes
Copy link

aerynes commented Jan 19, 2022

I used the classic anime, and the classic manga, they worked perfectly. Arigatou!

@jeyjai
Copy link

jeyjai commented Sep 13, 2023

Thank you so much, still works perfectly. Just make sure you use the correct version.
If you wanna do it on your phone, use kiwi browser.

The moronic mods on MAL are literally telling ppl not to use scripts, not to create new accounts, they're both bannable offenses. And to just suffer through it and remove everything manually because the other methods are taxing on their servers.... I'd rather switch service than waste an hour doing it manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment