Widget:indexSorterGrouper: Difference between revisions
Jump to navigation
Jump to search
m Missed some parts |
With a bit of luck this will fix things |
||
Line 12: | Line 12: | ||
// 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!) | ||
$(".gfl-doll-card").each(function() { | $(".gfl-doll-card").each(function() { | ||
try { | |||
var element = $(this); | var element = $(this); | ||
var name = element.find('.name').first().text(); | var name = element.find('.name').first().text(); | ||
var index = parseInt(element.find('.index').last().text()); | var index = parseInt(element.find('.index').last().text()); | ||
var srcStr = element. | var srcStr = element.attr("class"); | ||
var myRegexp = / | var myRegexp = /doll\-rarity\-(.*?) doll\-classification\-(.*?)$/g; | ||
var match = myRegexp.exec(srcStr); | var match = myRegexp.exec(srcStr); | ||
var classification = match[ | var classification = match[2]; | ||
var rarity = match[ | var rarity = match[1]; | ||
var serverDataSpans = $("span.serverdata[data-server-doll='" + name + "']"); | var serverDataSpans = $("span.serverdata[data-server-doll='" + name + "']"); | ||
Line 35: | Line 36: | ||
element.data('classification', classification); | element.data('classification', classification); | ||
element.data('rarity', rarity); | element.data('rarity', rarity); | ||
} | |||
catch(error) { | |||
console.log("Error handling index entry", error); | |||
} | |||
}); | }); | ||
Revision as of 23:41, 26 July 2024
Released on this server: