User:MateyY/CommentsDisabled.js

/* The following script was created by MateyY. * Version: 1.1 beta * For skins: oasis * JavaScript library used: jQuery * Function: Informs user whether comments are removed by changing the text displayed in the button. * Build for use on: Avatar Wiki; can also be used on other wikis * Do NOT use except with permission. * Do NOT copy the code; import it! * Thank you! */ $(document).ready(function {     //Insures correct skin is put to use: oasis     if (skin == "oasis") {          //Insures talk pages' talk button isn't messed up          if ($("#WikiaArticleComments").length <= 0) {               jQuery.noop;          } else if ((($("#article-comments").length < 1)) && ($("a.comments:contains(' Comments')"))) { //Articles with disabled comments support               $(".#WikiaPageHeader a.comments").html("Comments (disabled) ");          } else if (! ($("a.comments:contains('Comments')"))) { //Insures that only the button intended to change text changes text              jQuery.noop;          } else if ($(".WikiaBlogPostHeader a.comments:contains(' Comments')")) { //Blog posts with removed comments support               $(".WikiaBlogPostHeader a.comments").html("Comments (disabled) ");          } else if ($("#article-comm").prop("disabled")) { //Blog posts with disabled comments support               $(".WikiaBlogPostHeader a.comments").html("Comments (disabled) ");               $(".#WikiaPageHeader a.comments").html("Comments (disabled) ");          }     } });