diff --git a/theme/classic.html b/theme/classic.html
index a31d4dc..7b18366 100644
--- a/theme/classic.html
+++ b/theme/classic.html
@@ -655,9 +655,7 @@
files[$i].parentNode.parentNode.innerHTML='
| ';
$i--;
} else {
- var nurl=window.location.href;
- if (nurl.substr(-1)!="/") nurl+="/";
- var url=nurl+str+'?thumbnails';
+ var url=files[$i].href.replace(/preview/, 'thumbnails');
get_thumbnails_url(url, str, files[$i]);
}
}