User:Fluffle Bot/wikia.js

// Add button when renaming files that fills in the reason with a link to FW:DN. $(function {   if ( mw.config.get('wgCanonicalSpecialPageName') === 'Movepage' && $('#wpNewTitleNs :selected').html === 'File' ) {       $('#wpReason').after( 'Descriptive name' );

$('#fwdnbtn').click(function {           $('#wpReason').val('descriptive file name');        }); } });

// Add automatic edit summary when editing old page version $(function {   if (mw.util.getParamValue('diff') === null && mw.util.getParamValue('oldid') !== null) {        var revuser = $('#mw-revision-info .mw-userlink').text,          summary = '&summary=Reverted to r',          $info = $('#mw-revision-info').text,          $editbutt = $('#ca-edit').length ? $('#ca-edit') : $('[data-id="editprofile"]');        summary += $info.substring(1, $info.indexOf(' by ')) + ' by ' + revuser + '';        $editbutt.attr('href', $editbutt.attr('href') + summary);    } });

// CacheCheck cacheSkip = []; cacheSkipLimit = 1000; importArticles({   type: 'script',    articles: [        'u:dev:CacheCheck/code.js'    ] });