• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
m
revert to global vars
Line 1: Line 1: −
(function($, ArticleComments){
+
(function($, ArticleComments, ClosedThreads){
 
"use strict";
 
"use strict";
console.log("Close Thread v0.5");
+
console.log("Close Thread v0.6");
 
+
 
function ExecCloseThreads(){
 
function ExecCloseThreads(){
$(".wikiCloseCommentThread").each(function(){
+
$(ClosedThreads).each(function(index, comment_id){
console.log("Closing: "+this.closest(".comment" ).attr("id"));
+
console.log("Closing: "+comment_id);
$(".article-comm-reply", this.closest(".comment" )).hide();
+
$("#comm-"+comment_id+" .article-comm-reply").hide();
 
});
 
});
 
}
 
}
 
   
 
   
 
$(window).load(function(){
 
$(window).load(function(){
var realFunc = ArticleComments.addHover;
+
if(ClosedThreads.length > 0){
ArticleComments.addHover = function () {
+
var realFunc = ArticleComments.addHover;
var result = realFunc.apply(this, arguments);
+
ArticleComments.addHover = function () {
ExecCloseThreads();
+
var result = realFunc.apply(this, arguments);
return result;
+
ExecCloseThreads();
};
+
return result;
 +
};
 +
}
 
});
 
});
 
   
 
   
}(jQuery, window.ArticleComments));
+
}(jQuery, window.ArticleComments, window.CloseThread));
15

edits

Navigation menu