User:Bhpsngum/common.js

if (mw.config.get('wgTitle') === 'Changelogs') {	    $.ajax("https://starblast.io/changelog.txt") .done(function (data) {$("#mw-changelog").html(data.replace(/(\d{4}[-]\d{2}[-]\d{2})/g,' $1 ').replace(/\n+/g,"\n").replace(/^[^<]\s*(\*|\+|-|–)*\s*.+/gm,function ( v ) {          sp = "",u = v,i = 1;           u=u.replace(/^\s+/g,function ( d ) { for (i=1;i<=d.length;i++) sp+=" "; return ""; });          if ("*-+–".indexOf(u[0])!= -1)           {             fc=u[0];             u=u.slice(1,u.length).replace(/^\s*/g,"");           }           else fc = "";           u=u[0].toUpperCase+u.slice(1,v.length);           switch (fc)           {             case "*":               return ""+u+"";             case "–":             case "-":               return " "+"    "+"– "+u+" ";             case "+":               return " "+"      "+"+ "+u+" ";             default:               return " "+sp+fc+u+" ";           }         }).replace(/<\/ul>(\n|\r)*/g,""))}) .fail(function (e) {$("#mw-changelog").html(" An error occured while loading data from the server! Please reload the page and try again ")}); }