User:Surgematrix/link.js

// Link to deletedrevisions API output for deleted pages $.ready.then(function {

if (mw.config.get('wgArticleId') === 0 && !!$('.mw-warning-with-logexcerpt:contains("deleted page")').length) {

var link = 'https://ja.wikipedia.org/w/api.php?' + $.param({	       action: 'query',	        prop:'deletedrevisions',	        titles: mw.config.get('wgPageName').replace(/_/g, ' '),	        drvprop: 'user|timestamp|tags|size',	        drvlimit: 'max',	        formatversion: 2	    }); $('.mw-warning-with-logexcerpt').before(	       $(' ').append( 'See ', $('').attr('href', link).text('deleted revisions') )	   );	} });