readd always-resize-image user setting

This commit is contained in:
albert
2013-02-20 14:48:24 -05:00
parent a4ab27a6c6
commit 9a29edffb7
3 changed files with 6 additions and 0 deletions

View File

@@ -20,6 +20,10 @@
this.initialize_post_image_resize_links();
this.initialize_post_image_resize_to_window_link();
this.place_jlist_ads();
if (Danbooru.meta("always-resize-images") === "true") {
$("#image-resize-to-window-link").click();
}
}
}

View File

@@ -98,6 +98,7 @@
<meta name="post-is-deleted" content="<%= @post.is_deleted? %>">
<meta name="post-is-flagged" content="<%= @post.is_flagged? %>">
<meta name="config-large-width" content="<%= Danbooru.config.large_image_width %>">
<meta name="always-resize-images" content="<%= CurrentUser.user.always_resize_images? %>">
<meta property="og:title" content="<%= h @post.presenter.humanized_essential_tag_string %> - <%= Danbooru.config.app_name %>">
<meta property="og:description" content="<%= h @post.presenter.humanized_tag_string %>">
<meta property="og:image" content="<%= @post.preview_file_url %>">

View File

@@ -12,6 +12,7 @@
<%= f.input :time_zone %>
<%= f.input :receive_email_notifications %>
<%= f.input :comment_threshold, :hint => "Comments below this score will be hidden by default" %>
<%= f.input :always_resize_images %>
<%= f.input :default_image_size, :hint => "Large is #{Danbooru.config.large_image_width} pixels wide, and original is whatever the original image is", :collection => %w(large original), :include_blank => false %>
<%= f.input :favorite_tags, :hint => "A list of whitespace delimited tags that show up in your profile", :input_html => {:size => "40x5"} %>
<%= f.input :blacklisted_tags, :hint => "A list of newline delimited tags that you never want to see", :input_html => {:size => "40x5"} %>