Difference between revisions of "Widget:indexSorterGrouper"

From Girls' Frontline Wiki
Jump to navigation Jump to search
(Added document-ready wait functionality as the MediaWiki does not wait for DOM)
m (Missing dot)
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
$(".card-bg-small").each(function() {
 
$(".card-bg-small").each(function() {
 
  var element = $(this);
 
  var element = $(this);
  var name = element.find('span').first().text();
+
  var name = element.find('.name').first().text();
  var index = parseInt(element.find('span').last().text());
+
  var index = parseInt(element.find('.index').last().text());
 
  var srcStr = element.find("img").eq(2).attr("src");
 
  var srcStr = element.find("img").eq(2).attr("src");
 
  var myRegexp = /^.*Icon_(.*)_(.*)star.*$/g;
 
  var myRegexp = /^.*Icon_(.*)_(.*)star.*$/g;
Line 283: Line 283:
 
       nameToSet = element.attr('data-server-wiki');
 
       nameToSet = element.attr('data-server-wiki');
 
     }
 
     }
     element.find('span').first().text(nameToSet);
+
     element.find('name').first().text(nameToSet);
 
   });
 
   });
 
    
 
    

Revision as of 21:02, 9 November 2019


 

Released on this server:

Some heading