User:Superwatery/wikia.js

/*I don't want to add a new topic, I wanted to edit the article talk page, so this one solves the problem*/ (function {   if (mw.config.get('wgNamespaceNumber') !== 1) return;    $('#ca-addsection').each(function { var copy_to = $('#ca-edit').attr('class', 'wds-button').clone(true); var copy_from = $(this).removeAttr('class').clone(true); $('#ca-edit').replaceWith(copy_from); $(this).replaceWith(copy_to); }); }); /*Determines the article area's background color and returns it as a string in the format of a CSS color value.*Determines the article area's background color and returns it as a string in the format of a CSS color value.*/ function getBackgroundColor { var bgColor = $('#WikiaPageBackground').css('background-color'); if (bgColor === 'transparent') { bgColor = $('#WikiaPage').css('background-color'); }   if (bgColor === 'transparent') { bgColor = $('#EditPageHeader').css('background-color'); }   return bgColor; }