Last active
April 2, 2022 03:18
-
-
Save necroshine0/73e10b2cf08fa7ababc4df1039853fb1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var filter = ["Def Leppard", "Queen", "Rammstein", "Paramore", "Nickelback", "Аннигиляторная пушка", | |
"Manowar", "Ария", "Blooded", "Presley", "KYPCK", "Kypck", "Король", "Metallica", | |
"Сектор", "Primal", "Плесень", "Marilyn", "Lumen", "Anti", "Sabaton", "Sargeist", "Filth", | |
"Арктида", "Marduk", "Bal-Sagoth", "Venom", "Рок-опера", "Skummer", "Jack", "DeadPoint", | |
"Tools of the Trade", "Frightmare", "Apocalyptica", "Элизиум", "Rush", "Океан", "Powerwolf", | |
"Dylan", "Marley", "Radiohead", "Вольная", "Linkin", "Theatres des Vampires", "Krypteria", | |
"Lennon", "Graveworm", "Korn", "Loudness", "Dangerkids", "X-Japan", "SCANDAL", "Стихий", | |
"Hendrix", "2nd Season", "The Pretty Reckless", "Placebo", "Iron Weasel", "System of a Down", | |
"ДДТ", "OOMPH!", "Horizon", "Abyssic", "Moonspell", "Элизиум", "Рахманинов", "Чайковский", "Шопен", | |
"Scorpions", "After The Burial", "Saliva", "Slipknot", "The Rolling Stones", "41", "10 лучших треков", | |
"Алиса", "Suicide Silence", "Six Feet Under", "Underground", "Green", "Lordi", "Indivision", "Geordie", | |
"Muse", "Tool", "Maroon5", "Fusion", "Orphans", "Alunah", "Сплин"]; | |
function scrollDown(callback) { | |
let scroll = document.body.scrollHeight; | |
let lastScroll = scroll; | |
window.scrollTo(0,document.body.scrollHeight); | |
requestAnimationFrame( | |
function() { | |
scroll = document.body.scrollHeight; | |
if(scroll != lastScroll) | |
scrollDown(callback); | |
else callback(); | |
} | |
); | |
} | |
scrollDown(function() { | |
var list = document.querySelectorAll(".audio_row"); | |
console.log(`Total songs: ${list.length}`); | |
function del(obj) { | |
console.log(`delete ${obj.title}`); | |
ajax.post( | |
"al_audio.php", { | |
act: "delete_audio", | |
oid: obj.ownerId, | |
aid: obj.id, | |
hash: obj.deleteHash, | |
restore: 1 | |
} | |
); | |
} | |
list.forEach(function(el) { | |
let obj = AudioUtils.asObject(AudioUtils.getAudioFromEl(el)); | |
for (let i in filter) | |
if (obj.performer.includes(filter[i])) { | |
del(obj); | |
return; | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment