Widget:indexSorterGrouper: Difference between revisions
Jump to navigation
Jump to search
Added document-ready wait functionality as the MediaWiki does not wait for DOM |
Changed search to class names instead of spans |
||
Line 5: | Line 5: | ||
$(".card-bg-small").each(function() { | $(".card-bg-small").each(function() { | ||
var element = $(this); | var element = $(this); | ||
var name = element.find(' | var name = element.find('name').first().text(); | ||
var index = parseInt(element.find(' | 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(' | element.find('name').first().text(nameToSet); | ||
}); | }); | ||
Revision as of 14:02, 9 November 2019
Released on this server: