- Welcome to the Kancolle Wiki!
- If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord
Difference between revisions of "User:Dragonjet/scripts/CloseThread.js"
Jump to navigation
Jump to search
m (logging) |
m (use template instead of global vars to determine comment IDs to close) |
||
Line 1: | Line 1: | ||
− | (function($, ArticleComments | + | (function($, ArticleComments){ |
"use strict"; | "use strict"; | ||
− | console.log("Close Thread v0. | + | 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); |
− | $( | + | $(".article-comm-reply", $(".wikiCloseCommentThread").closest(".comment" )).hide(); |
− | |||
}); | }); | ||
} | } | ||
$(window).load(function(){ | $(window).load(function(){ | ||
− | + | var realFunc = ArticleComments.addHover; | |
− | + | ArticleComments.addHover = function () { | |
− | + | var result = realFunc.apply(this, arguments); | |
− | + | ExecCloseThreads(); | |
− | + | return result; | |
− | + | }; | |
− | |||
− | |||
}); | }); | ||
− | }(jQuery, window.ArticleComments | + | }(jQuery, window.ArticleComments)); |
Revision as of 11:00, 8 January 2015
(function($, ArticleComments){
"use strict";
console.log("Close Thread v0.3");
function ExecCloseThreads(){
$(ClosedThreads).each(function(index, comment_id){
console.log("Closing: "+comment_id);
$(".article-comm-reply", $(".wikiCloseCommentThread").closest(".comment" )).hide();
});
}
$(window).load(function(){
var realFunc = ArticleComments.addHover;
ArticleComments.addHover = function () {
var result = realFunc.apply(this, arguments);
ExecCloseThreads();
return result;
};
});
}(jQuery, window.ArticleComments));