User:Doork/wikia.js

// User Files Button $(function {   if ( wgNamespaceNumber == 6 && !$('.categories').hasClass('ui-sortable')) {        $('.wikinav2 .WikiaPageHeader').css('padding-right', '0');        $('#WikiaPageHeader .comments').after( 'User files ' );       $('#user-files').click(function { $('#CategorySelectAdd').click; setTimeout(function {               $('#CategorySelectInput').val('User files').trigger(jQuery.Event('keydown', {which: 13}));                setTimeout(function { $('#CategorySelectSave').click; }, 500);           }, 500);        });    } });

// Gallery Files Button $(function {   if ( wgNamespaceNumber == 6 && !$('.categories').hasClass('ui-sortable')) {        $('.wikinav2 .WikiaPageHeader').css('padding-right', '0');        $('#WikiaPageHeader .comments').after( 'Gallery files ' );       $('#gallery-files').click(function { $('#CategorySelectAdd').click; setTimeout(function {               $('#CategorySelectInput').val('Gallery files').trigger(jQuery.Event('keydown', {which: 13}));                setTimeout(function { $('#CategorySelectSave').click; }, 500);           }, 500);        });    } });