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');

var links = [ {       name: 'CfDs', id: 'cfds', link: 'https://community.fandom.com/wiki/Category:Candidates_for_speedy_deletion?action=purge' },   {        name: 'Maintenance', id: 'maint', link: 'https://community.fandom.com/wiki/User:Noreplyz/Maintenance' },   {        name: 'Help', id: 'help', link: 'https://community.fandom.com/wiki/Special:RecentChanges?hidebots=1&reviewStatus=unpatrolled&namespace=12&limit=500&days=30&urlversion=2' },   {        name: '/f', id: 'social', link: 'https://community.fandom.com/wiki/Special:SocialActivity' },   {        name: 'Forum', id: 'forum', link: 'https://community.fandom.com/wiki/Special:RecentChanges?namespace=110' },   {        name: 'Adopt', id: 'adopt', link: 'https://community.fandom.com/wiki/Special:RecentChanges?tagfilter=NewAR' },   {        name: 'IMG', id: 'img', link: 'https://community.fandom.com/wiki/Special:RecentChanges?namespace=6' },   {        name: 'ILL', id: 'ill', link: 'https://community.fandom.com/wiki/Special:RecentChanges?namespace=4' } ];

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

mw.loader.using(['mediawiki.template.mustache'], function {   $(".wds-community-header__local-navigation .wds-tabs").prepend(Mustache.render(template, links));    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: 300,        rcend: ts,        rcprop: '',        format: 'json'    }).then(function(d) {        var len = d.query.recentchanges.length || 0;        $('#nore-nav-help a').text('Help (' + len + ')');    });

});