User:Robyn Grayson/wikia.js

/* User files/Gallery files button */ $(function {   if (wgNamespaceNumber == 6 && !$('.categories').hasClass('ui-sortable')) {        $('#WikiaArticle').before( '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);        });    } }); $(function {    if (wgNamespaceNumber == 6 && !$('.categories').hasClass('ui-sortable')) {        $('#WikiaArticle').before( '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);        });    } });