User:Noreplyz/common.js

// OTHER SCRIPTS // Walruses don't exist. Whales do. // When something goes wrong, blame Mime. importScriptURI('//noreply.fandom.com/index.php?title=User:Noreplyz/userpagetemplate.js&action=raw&ctype=text/javascript'); importScriptURI('//noreply.fandom.com/index.php?title=MediaWiki:FileUsage.js&action=raw&ctype=text/javascript'); mw.loader.load('//internal-soap.fandom.com/index.php?title=User:Noreplyz/scripts-ucp.js&action=raw&ctype=text/javascript');

var links = [ {       name: 'CfDs', link: 'https://community.fandom.com/wiki/Category:Candidates_for_speedy_deletion?action=purge' },   {        name: 'Maintenance', link: 'https://community.fandom.com/wiki/User:Noreplyz/Maintenance' },   {        name: 'Help', link: 'https://community.fandom.com/wiki/Special:RecentChanges?hidebots=1&reviewStatus=unpatrolled&namespace=12&limit=500&days=30&urlversion=2' },   {        name: '/d', link: 'https://community.fandom.com/wiki/Special:DiscussionsRC' },   {        name: 'Forum', link: 'https://community.fandom.com/wiki/Special:RecentChanges?namespace=110' },   {        name: 'Adopt', link: 'https://community.fandom.com/wiki/Special:RecentChanges?tagfilter=NewAR' },   {        name: 'MWT', link: 'https://community.fandom.com/wiki/Special:RecentChanges?hideenhanced=0&namespace=1201' },   {        name: 'IMG', link: 'https://community.fandom.com/wiki/Special:RecentChanges?namespace=6' },   {        name: 'ILL', link: 'https://community.fandom.com/wiki/Special:RecentChanges?namespace=4' },   {        name: 'WR', link: 'https://community.fandom.com/wiki/Special:RecentChanges?tagfilter=WelcomeReply' } ];

var template = '' + ' ' +           '' + ' Admin ' + '' + ' ' + ' ' +           ' ' +            '' + '' + '' + ' ' + '' + '' + ' ' +       ' ' +    '';

mw.loader.using(['mediawiki.template.mustache'], function {   var d = new Date;    d.setMonth(d.getMonth - 1);    var ts = d.toISOString;

new mw.Api.get({       action: 'query',        list: 'recentchanges',        rcnamespace: 12,        rcshow: 'unpatrolled|!bot',        rclimit: 1000,        rcend: ts,        rcprop: '',        format: 'json'    }).then(function(d) {        var len = d.query.recentchanges.length || 0;        links[2].name = 'Help (' + len + ')';        $(".wds-community-header__local-navigation .wds-tabs").prepend(Mustache.render(template, links));    });

});