download-original.js: fix interactions
This commit is contained in:
parent
ab661f9a5c
commit
557fbe91b4
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
onready(function(){
|
||||
$('.postfilename').each(function() {
|
||||
var do_original_filename = function() {
|
||||
var filename, truncated;
|
||||
if ($(this).attr('title')) {
|
||||
filename = $(this).attr('title');
|
||||
@ -31,5 +31,11 @@ onready(function(){
|
||||
.attr('href', $(this).parent().parent().find('a').attr('href'))
|
||||
.attr('title', _('Save as original filename') + (truncated ? ' (' + filename + ')' : ''))
|
||||
);
|
||||
};
|
||||
|
||||
$('.postfilename').each(do_original_filename);
|
||||
|
||||
$(document).bind('new_post', function(e, post) {
|
||||
$(post).find('.postfilename').each(do_original_filename);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user