• 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
use template instead of global vars to determine comment IDs to close
Line 1: Line 1: −
(function($, ArticleComments, ClosedThreads){
+
(function($, ArticleComments){
 
"use strict";
 
"use strict";
console.log("Close Thread v0.2");
+
console.log("Close Thread v0.3");
    
function ExecCloseThreads(){
 
function ExecCloseThreads(){
 
$(ClosedThreads).each(function(index, comment_id){
 
$(ClosedThreads).each(function(index, comment_id){
console.log("Closing: "+comment_id);
+
console.log("Closing: "+comment_id);
$("#comm-"+comment_id+" .article-comm-reply").hide();
+
$(".article-comm-reply", $(".wikiCloseCommentThread").closest(".comment" )).hide();
$("#comm-"+comment_id+" .tools").prepend('[Thread Closed]');
   
});
 
});
 
}
 
}
 
   
 
   
 
$(window).load(function(){
 
$(window).load(function(){
if(ClosedThreads.length > 0){
+
var realFunc = ArticleComments.addHover;
var realFunc = ArticleComments.addHover;
+
ArticleComments.addHover = function () {
ArticleComments.addHover = function () {
+
var result = realFunc.apply(this, arguments);
var result = realFunc.apply(this, arguments);
+
ExecCloseThreads();
ExecCloseThreads();
+
return result;
return result;
+
};
};
  −
}
   
});
 
});
 
   
 
   
}(jQuery, window.ArticleComments, window.CloseThread));
+
}(jQuery, window.ArticleComments));
15

edits

Navigation menu