Merge branch 'master' of github.com:r888888888/danbooru
This commit is contained in:
@@ -15,9 +15,9 @@ GIT
|
||||
|
||||
GIT
|
||||
remote: https://github.com/r888888888/dtext_rb.git
|
||||
revision: d93eace454647413a617cf9969f760806f88cc2f
|
||||
revision: cde341011c0b7ceddcd0123c88bd67e1cdd9743c
|
||||
specs:
|
||||
dtext_rb (1.5.1)
|
||||
dtext_rb (1.6.0)
|
||||
nokogiri (~> 1.6)
|
||||
|
||||
GIT
|
||||
|
||||
@@ -217,12 +217,6 @@
|
||||
}
|
||||
|
||||
Danbooru.Post.initialize_links = function() {
|
||||
$("#side-edit-link").click(function(e) {
|
||||
$("#post-edit-link").trigger("click");
|
||||
$("#post_tag_string").trigger("focus");
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("#copy-notes").click(function(e) {
|
||||
var current_post_id = $("meta[name=post-id]").attr("content");
|
||||
var other_post_id = parseInt(prompt("Enter the ID of the post to copy all notes to:"), 10);
|
||||
|
||||
@@ -229,6 +229,7 @@ div#c-posts {
|
||||
.fav-buttons {
|
||||
font-size: 14pt;
|
||||
text-align: center;
|
||||
margin: 0.5em 0;
|
||||
|
||||
input[type=submit] {
|
||||
padding: 0.2em 0.75em;
|
||||
|
||||
@@ -55,8 +55,24 @@
|
||||
}
|
||||
|
||||
form {
|
||||
input[type=text], input[type=submit], select {
|
||||
font-size: 1.5em;
|
||||
input[type=text] {
|
||||
vertical-align: top;
|
||||
font-size: 24pt;
|
||||
border: 1px solid #c5c5c5;
|
||||
}
|
||||
|
||||
textarea {
|
||||
vertical-align: top;
|
||||
border: 1px solid #c5c5c5;
|
||||
}
|
||||
|
||||
input[type=submit] {
|
||||
font-size: 160%;
|
||||
}
|
||||
|
||||
input[type=submit].tiny {
|
||||
font-size: 120%;
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,17 +86,17 @@
|
||||
}
|
||||
|
||||
div.paginator {
|
||||
font-size: 20pt;
|
||||
font-size: 24pt;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-top: 1em;
|
||||
|
||||
li {
|
||||
width: 30vw;
|
||||
display: inline-block;
|
||||
margin: 0 0.25em;
|
||||
|
||||
a, span {
|
||||
margin: 0;
|
||||
@@ -104,27 +120,24 @@
|
||||
|
||||
article.post-preview {
|
||||
margin: 0.5vw;
|
||||
width: 32vw;
|
||||
height: 32vw;
|
||||
width: 48.5vw;
|
||||
height: 48.5vw;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
|
||||
a {
|
||||
width: 32vw;
|
||||
width: 48.5vw;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
img {
|
||||
object-fit: cover;
|
||||
width: 32vw;
|
||||
height: 32vw;
|
||||
object-fit: contain;
|
||||
width: 48.5vw;
|
||||
height: 48.5vw;
|
||||
margin: 0 auto;
|
||||
border: none !important;
|
||||
}
|
||||
img.cropped-true {
|
||||
object-fit: cover;
|
||||
}
|
||||
&[data-tags~=animated]:before, &[data-file-ext=swf]:before, &[data-file-ext=webm]:before, &[data-file-ext=mp4]:before, &[data-file-ext=zip]:before {
|
||||
left: 0.5vw;
|
||||
@include animated-icon;
|
||||
|
||||
@@ -57,6 +57,8 @@ class PostReplacement < ApplicationRecord
|
||||
if md5_changed
|
||||
post.comments.create!({creator: User.system, body: comment_replacement_message, do_not_bump_post: true}, without_protection: true)
|
||||
ModAction.log(modaction_replacement_message)
|
||||
else
|
||||
post.queue_backup
|
||||
end
|
||||
|
||||
post.save!
|
||||
|
||||
@@ -2,19 +2,17 @@
|
||||
<li><%= link_to "Resize to window", "#", :id => "image-resize-to-window-link" %></li>
|
||||
<li><%= link_to "Favorite", favorites_path(:post_id => post.id), :remote => true, :method => :post, :id => "add-to-favorites", :title => "Shortcut is F" %></li>
|
||||
<li><%= link_to "Unfavorite", favorite_path(post), :remote => true, :method => :delete, :id => "remove-from-favorites" %></li>
|
||||
<li><%= link_to "Edit", "#", :id => "side-edit-link" %></li>
|
||||
<li><%= link_to_if post.visible?, "Download", post.file_url, :download => post.presenter.humanized_essential_tag_string + " - " + post.file_name %></li>
|
||||
<li id="random-post-list"><%= link_to "Random post", random_posts_path(:tags => params[:tags]), :id => "random-post" %></li>
|
||||
<li id="add-to-pool-list"><%= link_to "Add to pool", "#", :id => "pool" %></li>
|
||||
<% if post.is_note_locked? %>
|
||||
<li id="add-notes-list"><span id="note-locked-notice">Note locked</span></li>
|
||||
<% else %>
|
||||
<li id="add-notes-list"><%= link_to "Add notes", "#", :id => "translate", :title => "Shortcut is N" %></li>
|
||||
<li id="add-notes-list"><%= link_to "Add note", "#", :id => "translate", :title => "Shortcut is N" %></li>
|
||||
<% end %>
|
||||
<% if CurrentUser.is_builder? && post.has_notes? %>
|
||||
<li id="copy-all-notes-list"><%= link_to "Copy all notes", "#", :id => "copy-notes" %></li>
|
||||
<li id="copy-all-notes-list"><%= link_to "Copy notes", "#", :id => "copy-notes" %></li>
|
||||
<% end %>
|
||||
<li id="add-artist-commentary-list"><%= link_to "Add artist commentary", "#", :id => "add-commentary" %></li>
|
||||
<li id="add-artist-commentary-list"><%= link_to "Add commentary", "#", :id => "add-commentary" %></li>
|
||||
<li><%= link_to "Add to favorite group", "#", :id => "open-favgroup-dialog-link" %></li>
|
||||
<li><%= link_to "Find similar", iqdb_queries_path(:post_id => post.id), :method => :post, :remote => true %></li>
|
||||
|
||||
|
||||
@@ -32,20 +32,6 @@ end
|
||||
new_new_spammers = Set.new(Dmail.where("from_id >= ? and title in (?) and from_id not in (?)", MIN_USER_ID, BAD_TITLES, (spammers + new_spammers).to_a).pluck(:from_id))
|
||||
|
||||
combined_spammers = spammers + new_spammers + new_new_spammers
|
||||
User.without_timeout do
|
||||
combined_spammers.each do |uid|
|
||||
user = User.find(uid)
|
||||
tag_change_count = PostArchive.where(updater_id: uid).count
|
||||
vote_count = PostVote.where(user_id: uid).count
|
||||
comment_count = Comment.where(creator_id: uid).count
|
||||
dmail_count = Dmail.where(from_id: uid).count
|
||||
|
||||
if tag_change_count + vote_count + comment_count > 0
|
||||
puts "#{user.name},#{uid},#{tag_change_count},#{vote_count},#{comment_count},#{dmail_count}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
combined_spammers.each do |uid|
|
||||
unless Ban.where(user_id: uid).exists?
|
||||
Ban.create!(duration: 10000, reason: "Spam (automated ref f6147ace)", user_id: uid)
|
||||
|
||||
Reference in New Issue
Block a user