User:MateyY/CommentsDisabled.js

/* The following script was created by MateyY. * Version: 1.4 * For skins: oasis * JavaScript library used: jQuery * Function: Informs user whether comments are removed and/or disabled by changing the text displayed in the button and the heading comment counter on the bottom of the page. * Build for use on: all wikis * Do NOT copy the code; import it! * Thank you! */ (function($) {    $(function { if (skin === "oasis") { if ($("#WikiaArticleComments").length <= 0) $.noop; else if (($("#article-comments").length <= 0) && ($("#WikiaPageHeader").length > 0) && ($("#WikiaPageHeader a.comments:contains('Comments')"))) { $("#WikiaPageHeader a.comments").html(' Comments disabled '); $(".controls").remove; $("#article-comments-counter-header").html("Comments are disabled"); } else if (($("#article-comments").length <= 0) && ($("#WikiaUserPagesHeader a.comments:contains('Comments')"))) { $(".WikiaBlogPostHeader a.comments").html(' Comments disabled '); $(".controls").remove; $("#article-comments-counter-header").html("Comments are disabled"); } else if ($("#article-comm").is(":disabled") || $(".no-comments-allowed").length > 0) { $(".WikiaBlogPostHeader a.comments").html(' Comments disabled '); $("#WikiaPageHeader a.comments").html(' Comments disabled '); $(".controls").remove; $("#article-comments-counter-header").append(' (disabled) '); }         }     }); })(jQuery);