Jump to content

User:Eumat114/RandomAfC.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//Copied and modified from [[User:DannyS712/RandomAfC.js]]
mw.loader.using( 'mediawiki.util', function () {

    // Wait for the page to be parsed
    $( document ).ready( function () { 
    var link = mw.util.addPortletLink(
    'p-personal',
    '#',
    '(true) Random AfC',
    'pt-truerandafc',
    'Open a truly random AfC draft...',
    null,
    '#pt-preferences');
    $( link ).click( function ( event ) {
    	window.location ='//tools.wmflabs.org/RandomInCategory/Pending_AfC_submissions?site=wiki.riteme.site&cmnamespace=2|118&cmtype=page';}
    );
});
});