Starblast Wiki
Advertisement

CSS and Javascript changes must comply with the wiki design rules.


Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
$(function () {
  if (window.location.pathname == "/Changelogs")
  {
    $.ajax("https://starblast.io/changelog.txt").then(function(data){
      $("#mw-changelog").html(data.replace(/(\d{4}[-]\d{2}[-]\d{2})/g,'<h3><span class="mw-headline">$1</span></h3>').replace(/^[^<]\s*(\*|-|\+)*\s+.+/gm,function(v) {
        let sp="";
        v=v.replace(/^\s+/g,function(d){for (let i=1;i<=d.length*2;i++) sp+="&nbsp;";return "";});
        let fc=v[0];
        v=v.slice(1,v.length).replace(/^\s*/g,"");
        v=v[0].toUpperCase()+v.slice(1,v.length);
        switch (fc)
        {
          case "*":
            return "<ul><li>"+v+"</li></ul>";
          case "-":
          case "+":
            return "<p>"+sp+fc+" "+v+"</p>";
          default:
            return "<p>"+sp+fc+v+"</p>";
        }
      }).replace(/<\/ul>(\n|\r)*<ul>/g,""))
    }).catch(e => {
        $("#mw-changelog").html("<p>An error occured!</p><p>Please reload the page and try again!</p>")
      });
  }
}());
Advertisement