Welcome to IOPWiki, Commander.
With the release of the new game, we encourage contributions to topics related to Girls' Frontline 2. Learn how to contribute, read the maintenance guide, and join our Discord server to discuss major changes.
If you or someone you know can help deciphering the game files, contact our administrator.

Widget:indexSorterGrouper/sandbox: Difference between revisions

Welcome to IOP Wiki. This website is maintained by the Girls' Frontline community and is free to edit by anyone.
Jump to navigation Jump to search
Initial setup for testing
 
Removing first function
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><script>
<includeonly><script>
console.log("Debug0-1");
RLQ.push(['jquery', function () {
console.log("Debug0-2");
  $(document).ready(function() {
console.log("Debug1");
    // initially remove the paragraph
    var parents = $(".mw-headline").closest("h2");
    parents.each(function() {
      var parent = $(this);
      var paragraph = parent.next('p');
      paragraph.replaceWith(paragraph.children());
    });
console.log("Debug2");   
    // For now, we have to make sure the data is there (Change the template, dammit!)
$(".gfl-doll-card").each(function() {
try {
console.log("Debug3-1");
  var element = $(this);
  var name = element.find('.name').first().text();
  var index = parseInt(element.find('.index').last().text());
  var srcStr = element.attr("class");
  var myRegexp = /doll\-rarity\-(.*?) doll\-classification\-(.*?)$/g;
  var match = myRegexp.exec(srcStr);
  var classification = match[2];
  var rarity = match[1];
console.log("Debug3-2");
          var serverDataSpans = $("span.serverdata[data-server-doll='" + name + "']");
          serverDataSpans.each(function() {
            var serverDataSpan = $(this);
            var serverShort = serverDataSpan.attr('data-server-released');
            var serverDollName = serverDataSpan.attr('data-server-releasename');
            element.attr("data-server-" + serverShort, serverDollName);
          });
          serverDataSpans.remove();
 
  element.attr('data-server-WIKI', name);
  element.data('name', name);
  element.data('index', index);
  element.data('classification', classification);
  element.data('rarity', rarity);
console.log("Debug3-3");
  }
  catch(error) {
    console.log("Error handling index entry", error);
  }
});
   
console.log("Debug4");
    // Once everything is ready, default-sort it
    $('[data-initialsort]').click();
   
    // Activate ui for user
    $(".gf-button").prop('disabled', false);
    $('.removeAfterInitIsg').remove();
  });
}]);
 
function getFirstLetterGroup(element) {
  if (!element || element == null) {
    return " ";
  }
 
  var letter = element.charAt(0);
  if (letter >= "0" && letter <= "9") {
    letter = "#";
  }
  return letter.toLowerCase();
}
</script><div style="display:inline-block">
</script><div style="display:inline-block">
<button class="gf-button" data-tdollsortbutton="true" disabled data-initialsort="true" onclick="orderByClassRarityName(this);">By Class&gt;Rarity&gt;Name</button>
<button class="gf-button" data-tdollsortbutton="true" disabled data-initialsort="true" onclick="orderByClassRarityName(this);">By Class&gt;Rarity&gt;Name</button>

Latest revision as of 00:23, 27 July 2024


 

Released on this server:

Some heading