Added AJAX for thumbnails. It's 4 in the morning so I'll document this shit later

Signed-off-by: Difegue <sugoi@cock.li>