User:Nixinova/Newest article.js

(function {   if ($('title').text == 'User:Nixinova/Newest article – Official Minecraft Wiki') {      function link(target, text) {          if (!text) {              text = target;          }          return '' + text + '';      }      function update {          $.ajax({ url: 'https://minecraft.gamepedia.com/api.php?action=query&meta=siteinfo&siprop=statistics&list=recentchanges&rctype=new&rcnamespace=0&rcprop=title|user&rcshow=!redirect&format=json', dataType: 'jsonp' }).done(function(data) { let title = data.query.recentchanges[0].title; let user = data.query.recentchanges[0].user; let count = data.query.statistics.articles; let text = 'The newest article is ' + link(title) + ', created by ' + link('User:' + user, user) + '.'; let now = new Date; let updated = 'Last updated: ' + now.getUTCFullYear + '-' + (now.getUTCMonth+1).toString.padStart(2, '0') + '-' + now.getUTCDate + ' ' + now.getUTCHours.toString.padStart(2, '0') + ':' + now.getUTCMinutes.toString.padStart(2, '0') + ':' + now.getUTCSeconds.toString.padStart(2, '0') + ' (UTC)'; $('#count').text(Number(count).toLocaleString); $('#text').html(text); $('#notice').html; $('#updated').html(updated); });     }      $(function { update; setInterval(update, 10000); });   } }); // Adapted from https://tools.wmflabs.org/five-million/script.js?2