inline-expanding-filename.js: format

This commit is contained in:
Zankaria 2024-08-05 19:13:13 +02:00
parent 2749567c3f
commit 5306f1d1f9

View File

@ -13,21 +13,21 @@
* *
*/ */
onready(function(){ onready(function() {
var inline_expanding_filename = function() { let inlineExpandingFilename = function() {
$(this).find(".fileinfo > a").click(function(){ $(this).find(".fileinfo > a").click(function() {
var imagelink = $(this).parent().parent().find('a[target="_blank"]:first'); let imagelink = $(this).parent().parent().find('a[target="_blank"]:first');
if(imagelink.length > 0) { if (imagelink.length > 0) {
imagelink.click(); imagelink.click();
return false; return false;
} }
}); });
}; };
$('div[id^="thread_"]').each(inline_expanding_filename); $('div[id^="thread_"]').each(inlineExpandingFilename);
// allow to work with auto-reload.js, etc. // allow to work with auto-reload.js, etc.
$(document).on('new_post', function(e, post) { $(document).on('new_post', function(e, post) {
inline_expanding_filename.call(post); inlineExpandingFilename.call(post);
}); });
}); });