Dear visitors, IOP Wiki is currently the target of a denial of service campaign. We are investigating countermeasures. In the meantime, the Wiki may experience periods of unplanned downtime.

Widget:indexSorterGrouper: 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
Two different approachs?
m Missed some parts
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
RLQ.push(['jquery', function () {
RLQ.push(['jquery', function () {
   $(document).ready(function() {
   $(document).ready(function() {
    // 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());
    });
   
     // For now, we have to make sure the data is there (Change the template, dammit!)
     // For now, we have to make sure the data is there (Change the template, dammit!)
$(".card-bg-small").each(function() {
$(".gfl-doll-card").each(function() {
  var element = $(this);
  var element = $(this);
  var name = element.find('.name').first().text();
  var name = element.find('.name').first().text();
Line 247: Line 255:
       }
       }
        
        
       var groupHeaderText = getNumberText(currentTen) + "..." + getNumberText(nextElementTen);
      var currentIdxShow = currentTen;
      if (sortOrder != -1 && currentIdxShow > 1) currentIdxShow += 1;
       var groupHeaderText = getNumberText(currentIdxShow) + "..." + getNumberText(nextElementTen);
        
        
       var groupHeader = $("<h3 />").text(groupHeaderText).addClass("addedbysorter");
       var groupHeader = $("<h3 />").text(groupHeaderText).addClass("addedbysorter");
Line 273: Line 283:
   $('[data-tdollserverbutton="true"]').removeClass("enabled");
   $('[data-tdollserverbutton="true"]').removeClass("enabled");
    
    
   $('.card-bg-small.unreleased').removeClass('unreleased');
   $('.gfl-doll-card.unreleased').removeClass('unreleased');
   $('.card-bg-small').each(function() {
   $('.gfl-doll-card').each(function() {
     var element = $(this);
     var element = $(this);
     var nameToSet = "";
     var nameToSet = "";
Line 296: Line 306:
     var parent = $(this);
     var parent = $(this);
     // All elements inside the paragraph after the h2 which have special class
     // All elements inside the paragraph after the h2 which have special class
     var elements = parent.next().children().nextUntil("h2", ".card-bg-small");
     var elements = parent.nextUntil("h2", ".gfl-doll-card");
    // Or the old way...
    if (elements.length == 0) elements = parent.nextUntil("h2", ".card-bg-small");
    
    
     elements.detach().sort(comparer);
     elements.detach().sort(comparer);

Revision as of 22:28, 24 June 2024


 

Released on this server:

Some heading