User:Frietjes/addcheckforunknownparameters.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
Line 87:
var alphasort = confirm('Sort parameters alphabetically?');
// Sort
if(alphasort === true) {
plist.sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()) });
aa = a.replace(/([^0-9])([0-9][^0-9]*)$/, '$10$2');
bb = b.replace(/([^0-9])([0-9][^0-9]*)$/, '$10$2');
return aa.toLowerCase().localeCompare(bb.toLowerCase()) });
} else {
plist = plist.sort(function(a,b) { return klist[a] - klist[b] } );