Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
User:Dragonjet/scripts/CommentQuote.js
(view source)
Revision as of 16:23, 21 December 2014
14 bytes added
,
9 years ago
v3
Line 1:
Line 1:
(function($, ArticleComments){
(function($, ArticleComments){
"use strict";
"use strict";
+
console.log("Comment Quotes v0.3");
function AddButtons(){
function AddButtons(){
$("#article-comments-ul .comment").each(function(){
$("#article-comments-ul .comment").each(function(){
−
$(".tools", this).prepend('<a href="#article-comments" class="quoteBtn actionButton" data-id="'+$(this).attr("id")+'">Quote
.02
</a>');
+
$(".tools", this).prepend('<a href="#article-comments" class="quoteBtn actionButton" data-id="'+$(this).attr("id")+'">Quote</a>');
});
});
$(".quoteBtn").on("click", function(){
$(".quoteBtn").on("click", function(){
var origMsg = $(".article-comm-text", $("#"+$(this).data("id"))).text();
var origMsg = $(".article-comm-text", $("#"+$(this).data("id"))).text();
−
console.log(origMsg);
+
$("#article-comm.wikiaEditor").val("> ''"+origMsg
.trim()
+"''");
−
//
$("#article-comm.wikiaEditor").val("> ''"+origMsg+"''");
return true;
return true;
});
});
Dragonjet
15
edits