Kill trailing whitespaces in javascript files

This commit is contained in:
小太
2013-03-19 23:09:22 +11:00
parent 35f1304157
commit c107f96cec
25 changed files with 128 additions and 128 deletions

View File

@@ -1,23 +1,23 @@
(function() {
Danbooru.Comment = {};
Danbooru.Comment.initialize_all = function() {
if ($("#c-posts").length || $("#c-comments").length) {
this.initialize_response_link();
this.initialize_reply_links();
this.initialize_expand_links();
}
if ($("#c-posts").length && $("#a-show").length) {
Danbooru.Comment.highlight_threshold_comments(Danbooru.meta("post-id"));
}
}
Danbooru.Comment.quote_message = function(data) {
var stripped_body = data["body"].replace(/\[quote\](?:.|\n|\r)+?\[\/quote\](?:\r\n|\r|\n)*/gm, "");
return "[quote]\n" + data["creator_name"] + " said:\n" + stripped_body + "\n[/quote]\n\n";
}
Danbooru.Comment.quote = function(e) {
$.get(
"/comments/" + $(e.target).data('comment-id') + ".json",
@@ -36,11 +36,11 @@
);
e.preventDefault();
}
Danbooru.Comment.initialize_reply_links = function() {
$(".reply-link").click(Danbooru.Comment.quote);
}
Danbooru.Comment.initialize_expand_links = function() {
$(".comment-section form").hide();
$(".comment-section input.expand-comment-response").click(function(e) {
@@ -50,7 +50,7 @@
e.preventDefault();
});
}
Danbooru.Comment.initialize_response_link = function() {
$("a.expand-comment-response").click(function(e) {
$(e.target).hide();
@@ -59,10 +59,10 @@
Danbooru.scroll_to($form);
e.preventDefault();
});
$("div.new-comment form").hide();
}
Danbooru.Comment.highlight_threshold_comments = function(post_id) {
var threshold = parseInt(Danbooru.meta("user-comment-threshold"));
var articles = $("article.comment[data-post-id=" + post_id + "]");
@@ -73,7 +73,7 @@
}
})
}
Danbooru.Comment.hide_threshold_comments = function(post_id) {
var threshold = parseInt(Danbooru.meta("user-comment-threshold"));
var articles = $("article.comment[data-post-id=" + post_id + "]");