Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
User:Dragonjet/scripts/CommentWarning.js
(view source)
Revision as of 18:18, 15 March 2015
187 bytes added
,
9 years ago
m
attempt fix event-based prepend
Line 1:
Line 1:
(function($, ArticleComments){
(function($, ArticleComments){
"use strict";
"use strict";
−
console.log("Comment Warning v0.
4
"
);
+
console.log("Comment Warning v0.
5
");
−
console.log(ArticleComments
);
$(window).load(function(){
$(window).load(function(){
−
$(".kcCommentWarning").prependTo("#article-comments");
+
if(ArticleComments){
+
var realFunc = ArticleComments.init;
+
ArticleComments.init= function () {
+
var result = realFunc.apply(this, arguments);
+
$(".kcCommentWarning").prependTo("#article-comments");
+
$(".kcCommentWarning").show();
+
return result;
+
};
+
}
});
});
}(jQuery, window.ArticleComments));
}(jQuery, window.ArticleComments));
Dragonjet
15
edits